diff options
| author | Jon A. Cruz <jon@joncruz.org> | 2012-05-04 09:35:59 +0000 |
|---|---|---|
| committer | Jon A. Cruz <jon@joncruz.org> | 2012-05-04 09:35:59 +0000 |
| commit | 3b72e337ab1a812319a9557adcd8fc40c2f36bb7 (patch) | |
| tree | a64394c27307b434b03a1d09701df516b7150e97 /src/vanishing-point.cpp | |
| parent | Syntax of null pointer dereference checking (diff) | |
| download | inkscape-3b72e337ab1a812319a9557adcd8fc40c2f36bb7.tar.gz inkscape-3b72e337ab1a812319a9557adcd8fc40c2f36bb7.zip | |
C++ification of SPCtrlLine in preparation of visibility improvements.
(bzr r11321)
Diffstat (limited to 'src/vanishing-point.cpp')
| -rw-r--r-- | src/vanishing-point.cpp | 18 |
1 files changed, 9 insertions, 9 deletions
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 |
