summaryrefslogtreecommitdiff
path: root/rsvg-paint-server.c
diff options
context:
space:
mode:
authorDom Lachowicz <doml@src.gnome.org>2003-12-02 14:30:53 +0000
committerDom Lachowicz <doml@src.gnome.org>2003-12-02 14:30:53 +0000
commitd5950af2c1240c41958bf88d56ed7a00f4522148 (patch)
tree117b2636b4d7e8951cfaff9bc127e1458f25b42d /rsvg-paint-server.c
parentf0401357f595c5ec36918a2379bd43bf2412bd9a (diff)
downloadlibrsvg-d5950af2c1240c41958bf88d56ed7a00f4522148.tar.gz
bounding box gradients
Diffstat (limited to 'rsvg-paint-server.c')
-rw-r--r--rsvg-paint-server.c9
1 files changed, 3 insertions, 6 deletions
diff --git a/rsvg-paint-server.c b/rsvg-paint-server.c
index c6d020f5..daad3c3b 100644
--- a/rsvg-paint-server.c
+++ b/rsvg-paint-server.c
@@ -171,11 +171,9 @@ rsvg_paint_server_lin_grad_render (RsvgPaintServer *self, ArtRender *ar,
affine[3] = ctx->y1 - ctx->y0;
affine[4] = ctx->x0;
affine[5] = ctx->y0;
-
- art_affine_multiply (affine, affine, rlg->affine);
} else {
for (i = 0; i < 6; i++)
- affine[i] = rlg->affine[i];
+ affine[i] = ctx->affine[i];
}
/* compute [xy][12] in pixel space */
@@ -190,7 +188,7 @@ rsvg_paint_server_lin_grad_render (RsvgPaintServer *self, ArtRender *ar,
dy = y2 - y1;
/* workaround for an evil devide by 0 bug - not sure if this is sufficient */
- if (fabs(dx + dy) <= 0.0000001)
+ if (fabs(dx) + fabs(dy) <= 0.0000001)
scale = 0.;
else
scale = 1.0 / (dx * dx + dy * dy);
@@ -246,10 +244,9 @@ rsvg_paint_server_rad_grad_render (RsvgPaintServer *self, ArtRender *ar,
affine[4] = ctx->x0;
affine[5] = ctx->y0;
- art_affine_multiply (affine, affine, rrg->affine);
} else {
for (i = 0; i < 6; i++)
- affine[i] = rrg->affine[i];
+ affine[i] = ctx->affine[i];
}
agr = z->agr;