summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 184c16c)
raw | patch | inline | side by side (parent: 184c16c)
author | cilix42 <cilix42@users.sourceforge.net> | |
Wed, 18 Jun 2008 22:29:34 +0000 (22:29 +0000) | ||
committer | cilix42 <cilix42@users.sourceforge.net> | |
Wed, 18 Jun 2008 22:29:34 +0000 (22:29 +0000) |
src/nodepath.cpp | patch | blob | history | |
src/nodepath.h | patch | blob | history |
diff --git a/src/nodepath.cpp b/src/nodepath.cpp
index c9456d17e64f1ef79abbc1bb1fd8735b0cac34fc..0a599382364754b9266a98985926cf99b157d256 100644 (file)
--- a/src/nodepath.cpp
+++ b/src/nodepath.cpp
}
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...
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;
diff --git a/src/nodepath.h b/src/nodepath.h
index 42bfcfd212ec484e0d64bc6166c45304a151e383..77cf5a5184c24ba28047b05572e589a6627f3060 100644 (file)
--- a/src/nodepath.h
+++ b/src/nodepath.h
NR::Maybe<NR::Coord> sp_node_selected_common_coord (Inkscape::NodePath::Path *nodepath, NR::Dim2 axis);
void sp_nodepath_show_handles(Inkscape::NodePath::Path *nodepath, bool show);
+SPCanvasItem *sp_nodepath_generate_helperpath(SPDesktop *desktop, SPCurve *curve, const SPItem *item);
SPCanvasItem *sp_nodepath_generate_helperpath(SPDesktop *desktop, SPPath *path);
void sp_nodepath_show_helperpath(Inkscape::NodePath::Path *nodepath, bool show);
void sp_nodepath_make_straight_path(Inkscape::NodePath::Path *np);