From 3b72e337ab1a812319a9557adcd8fc40c2f36bb7 Mon Sep 17 00:00:00 2001 From: "Jon A. Cruz" Date: Fri, 4 May 2012 02:35:59 -0700 Subject: C++ification of SPCtrlLine in preparation of visibility improvements. (bzr r11321) --- src/vanishing-point.cpp | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) (limited to 'src/vanishing-point.cpp') diff --git a/src/vanishing-point.cpp b/src/vanishing-point.cpp index fb48fb2d9..f90966578 100644 --- a/src/vanishing-point.cpp +++ b/src/vanishing-point.cpp @@ -766,17 +766,17 @@ VPDrag::swap_perspectives_of_VPs(Persp3D *persp2, Persp3D *persp1) } /** -Create a line from p1 to p2 and add it to the lines list + * Create a line from p1 to p2 and add it to the lines list. */ -void -VPDrag::addLine (Geom::Point p1, Geom::Point p2, guint32 rgba) +void VPDrag::addLine(Geom::Point p1, Geom::Point p2, guint32 rgba) { - SPCanvasItem *line = sp_canvas_item_new(sp_desktop_controls(inkscape_active_desktop()), SP_TYPE_CTRLLINE, NULL); - sp_ctrlline_set_coords(SP_CTRLLINE(line), p1, p2); - if (rgba != VP_LINE_COLOR_FILL) // fill is the default, so don't set color for it to speed up redraw - sp_ctrlline_set_rgba32 (SP_CTRLLINE(line), rgba); - sp_canvas_item_show (line); - this->lines = g_slist_append (this->lines, line); + SPCtrlLine *line = SP_CTRLLINE(sp_canvas_item_new(sp_desktop_controls(inkscape_active_desktop()), SP_TYPE_CTRLLINE, NULL)); + line->setCoords(p1, p2); + if (rgba != VP_LINE_COLOR_FILL) { // fill is the default, so don't set color for it to speed up redraw + line->setRgba32(rgba); + } + sp_canvas_item_show(line); + this->lines = g_slist_append(this->lines, line); } } // namespace Box3D -- cgit v1.2.3