summaryrefslogtreecommitdiffstats
path: root/src/line-geometry.cpp
diff options
context:
space:
mode:
authorJon A. Cruz <jon@joncruz.org>2012-05-04 09:35:59 +0000
committerJon A. Cruz <jon@joncruz.org>2012-05-04 09:35:59 +0000
commit3b72e337ab1a812319a9557adcd8fc40c2f36bb7 (patch)
treea64394c27307b434b03a1d09701df516b7150e97 /src/line-geometry.cpp
parentSyntax of null pointer dereference checking (diff)
downloadinkscape-3b72e337ab1a812319a9557adcd8fc40c2f36bb7.tar.gz
inkscape-3b72e337ab1a812319a9557adcd8fc40c2f36bb7.zip
C++ification of SPCtrlLine in preparation of visibility improvements.
(bzr r11321)
Diffstat (limited to 'src/line-geometry.cpp')
-rw-r--r--src/line-geometry.cpp9
1 files changed, 4 insertions, 5 deletions
diff --git a/src/line-geometry.cpp b/src/line-geometry.cpp
index 2e528f3af..39f18dca4 100644
--- a/src/line-geometry.cpp
+++ b/src/line-geometry.cpp
@@ -211,11 +211,10 @@ void create_canvas_point(Geom::Point const &pos, double size, guint32 rgba)
void create_canvas_line(Geom::Point const &p1, Geom::Point const &p2, guint32 rgba)
{
SPDesktop *desktop = inkscape_active_desktop();
- SPCanvasItem *line = sp_canvas_item_new(sp_desktop_controls(desktop),
- SP_TYPE_CTRLLINE, NULL);
- sp_ctrlline_set_coords(SP_CTRLLINE(line), p1, p2);
- sp_ctrlline_set_rgba32 (SP_CTRLLINE(line), rgba);
- sp_canvas_item_show (line);
+ SPCtrlLine *line = SP_CTRLLINE(sp_canvas_item_new(sp_desktop_controls(desktop), SP_TYPE_CTRLLINE, NULL));
+ line->setCoords(p1, p2);
+ line->setRgba32(rgba);
+ sp_canvas_item_show(line);
}
} // namespace Box3D