From: johanengelen Date: Fri, 1 Aug 2008 16:55:14 +0000 (+0000) Subject: remove strange factor for showing the pattern unit cell (quarter of real cell). X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=16cdc741220f6b4f9e8825cebc5f2a9161270b17;p=inkscape.git remove strange factor for showing the pattern unit cell (quarter of real cell). --- diff --git a/src/knot-holder-entity.cpp b/src/knot-holder-entity.cpp index ee89c9383..d6c278d49 100644 --- a/src/knot-holder-entity.cpp +++ b/src/knot-holder-entity.cpp @@ -153,7 +153,7 @@ PatternKnotHolderEntityAngle::knot_get() { SPPattern *pat = SP_PATTERN(SP_STYLE_FILL_SERVER(SP_OBJECT(item)->style)); - gdouble x = (pattern_width(pat)*0.5); + gdouble x = (pattern_width(pat)); gdouble y = 0; NR::Point delta = NR::Point(x,y); NR::Point scale = sp_pattern_extract_scale(pat); @@ -202,8 +202,8 @@ PatternKnotHolderEntityScale::knot_set(NR::Point const &p, NR::Point const &/*or // Get the new scale from the position of the knotholder NR::Point d = p_snapped - sp_pattern_extract_trans(pat); d *= NR::Matrix(NR::rotate(-theta)); - gdouble pat_x = pattern_width(pat) * 0.5; - gdouble pat_y = pattern_height(pat) * 0.5; + gdouble pat_x = pattern_width(pat); + gdouble pat_y = pattern_height(pat); NR::Point scl (d[NR::X] / pat_x, d[NR::Y] / pat_y); NR::Matrix rot = NR::Matrix(NR::scale(scl)) * NR::Matrix(NR::rotate(theta)); @@ -221,8 +221,8 @@ PatternKnotHolderEntityScale::knot_get() { SPPattern *pat = SP_PATTERN(SP_STYLE_FILL_SERVER(SP_OBJECT(item)->style)); - gdouble x = pattern_width(pat)*0.5; - gdouble y = pattern_height(pat)*0.5; + gdouble x = pattern_width(pat); + gdouble y = pattern_height(pat); NR::Point delta = NR::Point(x,y); NR::Matrix a = pat->patternTransform; a[4] = 0;