diff options
Diffstat (limited to 'xps')
-rw-r--r-- | xps/xps_gradient.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/xps/xps_gradient.c b/xps/xps_gradient.c index 77d9c56f..a0b342bc 100644 --- a/xps/xps_gradient.c +++ b/xps/xps_gradient.c @@ -391,7 +391,7 @@ xps_draw_linear_gradient(xps_document *doc, fz_matrix ctm, fz_rect area, xps_parse_point(end_point_att, &x1, &y1); p1.x = x0; p1.y = y0; p2.x = x1; p2.y = y1; - p1 = fz_transform_point(ctm, p1); p2 = fz_transform_point(ctm, p2); + area = fz_transform_rect(fz_invert_matrix(ctm), area); x = p2.x - p1.x; y = p2.y - p1.y; k = ((area.x0 - p1.x) * x + (area.y0 - p1.y) * y) / (x * x + y * y); mi = floorf(k); ma = ceilf(k); |