diff options
| author | bulia byak <buliabyak@gmail.com> | 2008-06-05 18:10:40 +0000 |
|---|---|---|
| committer | buliabyak <buliabyak@users.sourceforge.net> | 2008-06-05 18:10:40 +0000 |
| commit | 96ee2fd89a977796916290ffda95ba609ac8e8ce (patch) | |
| tree | a53f643addbe743ceea7cb3cc1badd65a3ca030d /src/sp-path.cpp | |
| parent | added HPGL export extension, courtesy of Aaron Spike (diff) | |
| download | inkscape-96ee2fd89a977796916290ffda95ba609ac8e8ce.tar.gz inkscape-96ee2fd89a977796916290ffda95ba609ac8e8ce.zip | |
optimization: don't copy SPCurve when transforming it, do this in place
(bzr r5819)
Diffstat (limited to 'src/sp-path.cpp')
| -rw-r--r-- | src/sp-path.cpp | 16 |
1 files changed, 5 insertions, 11 deletions
diff --git a/src/sp-path.cpp b/src/sp-path.cpp index b2e26efa0..511e1efc5 100644 --- a/src/sp-path.cpp +++ b/src/sp-path.cpp @@ -378,17 +378,11 @@ sp_path_set_transform(SPItem *item, NR::Matrix const &xform) } // Transform the original-d path or the (ordinary) path - bool original_path = (bool)path->original_curve; - SPCurve *srccurve = original_path ? path->original_curve : shape->curve; - SPCurve *dstcurve = srccurve->copy(); - if (dstcurve) { - dstcurve->transform(xform); - if (original_path) { - sp_path_set_original_curve(path, dstcurve, TRUE, true); - } else { - sp_shape_set_curve(shape, dstcurve, TRUE); - } - dstcurve->unref(); + if (path->original_curve) { + path->original_curve->transform(xform); + sp_lpe_item_update_patheffect(path, true, true); + } else { + shape->curve->transform(xform); } // Adjust stroke |
