diff options
| author | Johan B. C. Engelen <jbc.engelen@swissonline.ch> | 2008-08-01 16:55:14 +0000 |
|---|---|---|
| committer | johanengelen <johanengelen@users.sourceforge.net> | 2008-08-01 16:55:14 +0000 |
| commit | a5704894734640d0b6c770279169085259fa167b (patch) | |
| tree | 0b51f553f03c1acd12277d64e461c9ea6b41bfae /src/knot-holder-entity.cpp | |
| parent | patterns: make it possible to have different scaling in X and Y directions. s... (diff) | |
| download | inkscape-a5704894734640d0b6c770279169085259fa167b.tar.gz inkscape-a5704894734640d0b6c770279169085259fa167b.zip | |
remove strange factor for showing the pattern unit cell (quarter of real cell).
(bzr r6503)
Diffstat (limited to 'src/knot-holder-entity.cpp')
| -rw-r--r-- | src/knot-holder-entity.cpp | 10 |
1 files changed, 5 insertions, 5 deletions
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; |
