diff options
| author | Maximilian Albert <maximilian.albert@gmail.com> | 2008-06-18 22:29:34 +0000 |
|---|---|---|
| committer | cilix42 <cilix42@users.sourceforge.net> | 2008-06-18 22:29:34 +0000 |
| commit | 0d507e3c1be32106f58ade1c9e1171e330d6b25f (patch) | |
| tree | d8f2be7b6aa6aec31760d5eb19396099e90838d8 /src/nodepath.cpp | |
| parent | parser (diff) | |
| download | inkscape-0d507e3c1be32106f58ade1c9e1171e330d6b25f.tar.gz inkscape-0d507e3c1be32106f58ade1c9e1171e330d6b25f.zip | |
Separate version of sp_nodepath_generate_helperpath() to generate a helperpath from a SPCurve directly
(bzr r5992)
Diffstat (limited to 'src/nodepath.cpp')
| -rw-r--r-- | src/nodepath.cpp | 14 |
1 files changed, 9 insertions, 5 deletions
diff --git a/src/nodepath.cpp b/src/nodepath.cpp index c9456d17e..0a5993823 100644 --- a/src/nodepath.cpp +++ b/src/nodepath.cpp @@ -4741,11 +4741,10 @@ void sp_nodepath_set_curve (Inkscape::NodePath::Path *np, SPCurve *curve) { } SPCanvasItem * -sp_nodepath_generate_helperpath(SPDesktop *desktop, SPPath *path) { - // This should be put somewhere else under the name of "generate helperpath" or something. Because basically this is copied of code from nodepath... - SPCurve *curve_new = sp_path_get_curve_for_edit(path); - SPCurve *flash_curve = curve_new->copy(); - flash_curve->transform(sp_item_i2d_affine(SP_ITEM(path))); +sp_nodepath_generate_helperpath(SPDesktop *desktop, SPCurve *curve, const SPItem *item) { + SPCurve *flash_curve = curve->copy(); + Geom::Matrix i2d = item ? sp_item_i2d_affine(item) : Geom::identity(); + flash_curve->transform(i2d); SPCanvasItem * canvasitem = sp_canvas_bpath_new(sp_desktop_tempgroup(desktop), flash_curve); // would be nice if its color could be XORed or something, now it is invisible for red stroked objects... // unless we also flash the nodes... @@ -4757,6 +4756,11 @@ sp_nodepath_generate_helperpath(SPDesktop *desktop, SPPath *path) { return canvasitem; } +SPCanvasItem * +sp_nodepath_generate_helperpath(SPDesktop *desktop, SPPath *path) { + return sp_nodepath_generate_helperpath(desktop, sp_path_get_curve_for_edit(path), SP_ITEM(path)); +} + void sp_nodepath_show_helperpath(Inkscape::NodePath::Path *np, bool show) { np->show_helperpath = show; |
