cairo 1.4.1 → 1.5.0
Sign up to get free protection for your applications and to get access to all the features.
Potentially problematic release.
This version of cairo might be problematic. Click here for more details.
- data/ChangeLog +259 -0
- data/NEWS +32 -0
- data/README +5 -0
- data/Rakefile +88 -4
- data/misc/update-colors.rb +143 -0
- data/samples/.#blur.rb.1.1 +36 -0
- data/samples/blur.rb +47 -0
- data/samples/pac.rb +22 -28
- data/samples/pac2.rb +26 -32
- data/samples/png.rb +34 -31
- data/samples/scalable.rb +24 -26
- data/samples/text-on-path.rb +6 -7
- data/samples/text2.rb +16 -18
- data/src/cairo.def +31 -0
- data/src/lib/cairo.rb +25 -7
- data/src/lib/cairo/color.rb +255 -0
- data/src/lib/cairo/colors.rb +656 -0
- data/src/lib/cairo/constants.rb +21 -0
- data/src/lib/cairo/context.rb +16 -2
- data/src/lib/cairo/context/blur.rb +45 -0
- data/src/lib/cairo/context/circle.rb +2 -2
- data/src/lib/cairo/context/color.rb +11 -0
- data/src/lib/cairo/context/path.rb +17 -28
- data/src/lib/cairo/path.rb +15 -0
- data/src/lib/cairo/point.rb +7 -0
- data/src/rb_cairo.c +8 -17
- data/src/rb_cairo.h +44 -3
- data/src/rb_cairo_constants.c +129 -137
- data/src/rb_cairo_context.c +224 -112
- data/src/rb_cairo_font_extents.c +4 -3
- data/src/rb_cairo_font_face.c +3 -10
- data/src/rb_cairo_font_options.c +6 -4
- data/src/rb_cairo_glyph.c +4 -3
- data/src/rb_cairo_matrix.c +97 -4
- data/src/rb_cairo_path.c +408 -24
- data/src/rb_cairo_pattern.c +130 -70
- data/src/rb_cairo_private.c +40 -13
- data/src/rb_cairo_private.h +40 -2
- data/src/rb_cairo_scaled_font.c +3 -10
- data/src/rb_cairo_surface.c +172 -50
- data/src/rb_cairo_text_extents.c +3 -2
- metadata +15 -5
- data/src/lib/cairo/context/quad.rb +0 -19
@@ -1,19 +0,0 @@
|
|
1
|
-
module Cairo
|
2
|
-
class Context
|
3
|
-
module Quad
|
4
|
-
def quad_to(x1, y1, x2, y2)
|
5
|
-
x0, y0 = current_point
|
6
|
-
cx1 = x0 + 2 * (x1 - x0) / 3.0
|
7
|
-
cy1 = y0 + 2 * (y1 - y0) / 3.0
|
8
|
-
cx2 = cx1 + (x2 - x0) / 3.0
|
9
|
-
cy2 = cy1 + (y2 - y0) / 3.0
|
10
|
-
curve_to(cx1, cy1, cx2, cy2, x2, y2)
|
11
|
-
end
|
12
|
-
|
13
|
-
def rel_quad_to(x1, y1, x2, y2)
|
14
|
-
x0, y0 = current_point
|
15
|
-
quad_to(x1 + x0, y1 + y0, x2 + x0, y2 + x0)
|
16
|
-
end
|
17
|
-
end
|
18
|
-
end
|
19
|
-
end
|