From 0adfd757e07cf18268be1240e7ef91dac27506ea Mon Sep 17 00:00:00 2001 From: buliabyak Date: Thu, 27 Mar 2008 19:46:25 +0000 Subject: [PATCH] patch from bug 168024 --- src/sp-pattern.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/sp-pattern.cpp b/src/sp-pattern.cpp index dcf09fdbf..f89562d25 100644 --- a/src/sp-pattern.cpp +++ b/src/sp-pattern.cpp @@ -679,11 +679,11 @@ sp_pattern_painter_new (SPPaintServer *ps, NR::Matrix const &full_transform, NR: pp->px2ps = pp->ps2px.inverse(); if (pat->viewBox_set) { - gdouble tmp_x = (pattern_viewBox(pat)->x1 - pattern_viewBox(pat)->x0) / pattern_width (pat); - gdouble tmp_y = (pattern_viewBox(pat)->y1 - pattern_viewBox(pat)->y0) / pattern_height (pat); + gdouble tmp_x = pattern_width (pat) / (pattern_viewBox(pat)->x1 - pattern_viewBox(pat)->x0); + gdouble tmp_y = pattern_height (pat) / (pattern_viewBox(pat)->y1 - pattern_viewBox(pat)->y0); // FIXME: preserveAspectRatio must be taken into account here too! - NR::Matrix vb2ps (tmp_x, 0.0, 0.0, tmp_y, pattern_x(pat) - pattern_viewBox(pat)->x0, pattern_y(pat) - pattern_viewBox(pat)->y0); + NR::Matrix vb2ps (tmp_x, 0.0, 0.0, tmp_y, pattern_x(pat) - pattern_viewBox(pat)->x0 * tmp_x, pattern_y(pat) - pattern_viewBox(pat)->y0 * tmp_y); NR::Matrix vb2us = vb2ps * pattern_patternTransform(pat); -- 2.30.2