diff options
author | Carl Worth <cworth@cworth.org> | 2007-02-25 16:01:10 +0100 |
---|---|---|
committer | Carl Worth <cworth@cworth.org> | 2007-03-01 13:21:54 -0800 |
commit | 0439f4c4f7e7374b4f9699f664fc0e157628b190 (patch) | |
tree | 38785ff392f15e6c8e643d0dadade62cf1f59657 /src | |
parent | d65455ed3800f9ec3115bbed96a5b2328ee60b57 (diff) |
Rename radial gradient inner/outer to c1/c2
The inner/outer names were totally bogus. It is quite
legitimate to have the first circle's radius be larger than
that of the second.
Diffstat (limited to 'src')
-rw-r--r-- | src/cairo-pattern.c | 36 | ||||
-rw-r--r-- | src/cairo-pdf-surface.c | 12 | ||||
-rw-r--r-- | src/cairo-svg-surface.c | 12 |
3 files changed, 30 insertions, 30 deletions
diff --git a/src/cairo-pattern.c b/src/cairo-pattern.c index ae271f86..f613f0ed 100644 --- a/src/cairo-pattern.c +++ b/src/cairo-pattern.c @@ -238,12 +238,12 @@ _cairo_pattern_init_radial (cairo_radial_pattern_t *pattern, { _cairo_pattern_init_gradient (&pattern->base, CAIRO_PATTERN_TYPE_RADIAL); - pattern->gradient.inner.x = _cairo_fixed_from_double (cx0); - pattern->gradient.inner.y = _cairo_fixed_from_double (cy0); - pattern->gradient.inner.radius = _cairo_fixed_from_double (fabs (radius0)); - pattern->gradient.outer.x = _cairo_fixed_from_double (cx1); - pattern->gradient.outer.y = _cairo_fixed_from_double (cy1); - pattern->gradient.outer.radius = _cairo_fixed_from_double (fabs (radius1)); + pattern->gradient.c1.x = _cairo_fixed_from_double (cx0); + pattern->gradient.c1.y = _cairo_fixed_from_double (cy0); + pattern->gradient.c1.radius = _cairo_fixed_from_double (fabs (radius0)); + pattern->gradient.c2.x = _cairo_fixed_from_double (cx1); + pattern->gradient.c2.y = _cairo_fixed_from_double (cy1); + pattern->gradient.c2.radius = _cairo_fixed_from_double (fabs (radius1)); } cairo_pattern_t * @@ -1771,12 +1771,12 @@ cairo_pattern_get_linear_points (cairo_pattern_t *pattern, /** * cairo_pattern_get_radial_circles * @pattern: a #cairo_pattern_t - * @x0: return value for the x coordinate of the center of the first (inner) circle, or %NULL - * @y0: return value for the y coordinate of the center of the first (inner) circle, or %NULL - * @r0: return value for the radius of the first (inner) circle, or %NULL - * @x1: return value for the x coordinate of the center of the second (outer) circle, or %NULL - * @y1: return value for the y coordinate of the center of the second (outer) circle, or %NULL - * @r1: return value for the radius of the second (outer) circle, or %NULL + * @x0: return value for the x coordinate of the center of the first circle, or %NULL + * @y0: return value for the y coordinate of the center of the first circle, or %NULL + * @r0: return value for the radius of the first circle, or %NULL + * @x1: return value for the x coordinate of the center of the second circle, or %NULL + * @y1: return value for the y coordinate of the center of the second circle, or %NULL + * @r1: return value for the radius of the second circle, or %NULL * * Gets the gradient endpoint circles for a radial gradient, each * specified as a center coordinate and a radius. @@ -1798,17 +1798,17 @@ cairo_pattern_get_radial_circles (cairo_pattern_t *pattern, return CAIRO_STATUS_PATTERN_TYPE_MISMATCH; if (x0) - *x0 = _cairo_fixed_to_double (radial->gradient.inner.x); + *x0 = _cairo_fixed_to_double (radial->gradient.c1.x); if (y0) - *y0 = _cairo_fixed_to_double (radial->gradient.inner.y); + *y0 = _cairo_fixed_to_double (radial->gradient.c1.y); if (r0) - *r0 = _cairo_fixed_to_double (radial->gradient.inner.radius); + *r0 = _cairo_fixed_to_double (radial->gradient.c1.radius); if (x1) - *x1 = _cairo_fixed_to_double (radial->gradient.outer.x); + *x1 = _cairo_fixed_to_double (radial->gradient.c2.x); if (y1) - *y1 = _cairo_fixed_to_double (radial->gradient.outer.y); + *y1 = _cairo_fixed_to_double (radial->gradient.c2.y); if (r1) - *r1 = _cairo_fixed_to_double (radial->gradient.outer.radius); + *r1 = _cairo_fixed_to_double (radial->gradient.c2.radius); return CAIRO_STATUS_SUCCESS; } diff --git a/src/cairo-pdf-surface.c b/src/cairo-pdf-surface.c index fa6c8307..104c339d 100644 --- a/src/cairo-pdf-surface.c +++ b/src/cairo-pdf-surface.c @@ -1257,13 +1257,13 @@ emit_radial_pattern (cairo_pdf_surface_t *surface, cairo_radial_pattern_t *patte p2u = pattern->base.base.matrix; cairo_matrix_invert (&p2u); - x0 = _cairo_fixed_to_double (pattern->gradient.inner.x); - y0 = _cairo_fixed_to_double (pattern->gradient.inner.y); - r0 = _cairo_fixed_to_double (pattern->gradient.inner.radius); + x0 = _cairo_fixed_to_double (pattern->gradient.c1.x); + y0 = _cairo_fixed_to_double (pattern->gradient.c1.y); + r0 = _cairo_fixed_to_double (pattern->gradient.c1.radius); cairo_matrix_transform_point (&p2u, &x0, &y0); - x1 = _cairo_fixed_to_double (pattern->gradient.outer.x); - y1 = _cairo_fixed_to_double (pattern->gradient.outer.y); - r1 = _cairo_fixed_to_double (pattern->gradient.outer.radius); + x1 = _cairo_fixed_to_double (pattern->gradient.c2.x); + y1 = _cairo_fixed_to_double (pattern->gradient.c2.y); + r1 = _cairo_fixed_to_double (pattern->gradient.c2.radius); cairo_matrix_transform_point (&p2u, &x1, &y1); /* FIXME: This is surely crack, but how should you scale a radius diff --git a/src/cairo-svg-surface.c b/src/cairo-svg-surface.c index 1788a99a..fefe2d4a 100644 --- a/src/cairo-svg-surface.c +++ b/src/cairo-svg-surface.c @@ -1271,12 +1271,12 @@ emit_radial_pattern (cairo_svg_surface_t *surface, double x0, y0, x1, y1, r0, r1; double fx, fy; - x0 = _cairo_fixed_to_double (pattern->gradient.inner.x); - y0 = _cairo_fixed_to_double (pattern->gradient.inner.y); - r0 = _cairo_fixed_to_double (pattern->gradient.inner.radius); - x1 = _cairo_fixed_to_double (pattern->gradient.outer.x); - y1 = _cairo_fixed_to_double (pattern->gradient.outer.y); - r1 = _cairo_fixed_to_double (pattern->gradient.outer.radius); + x0 = _cairo_fixed_to_double (pattern->gradient.c1.x); + y0 = _cairo_fixed_to_double (pattern->gradient.c1.y); + r0 = _cairo_fixed_to_double (pattern->gradient.c1.radius); + x1 = _cairo_fixed_to_double (pattern->gradient.c2.x); + y1 = _cairo_fixed_to_double (pattern->gradient.c2.y); + r1 = _cairo_fixed_to_double (pattern->gradient.c2.radius); /* SVG doesn't have a start radius, so computing now SVG focal coordinates * and emulating start radius by translating color stops. |