diff options
| author | Denis Declara <declara91@gmail.com> | 2012-05-05 13:32:42 +0000 |
|---|---|---|
| committer | Denis Declara <declara91@gmail.com> | 2012-05-05 13:32:42 +0000 |
| commit | aeb9c1bde66de096910757abb17dedb94ad74207 (patch) | |
| tree | c0adf97685b0fa8af1553b14d20601f280492762 /src/vanishing-point.cpp | |
| parent | Fixed some math, so that the objects now line up correctly (diff) | |
| parent | Adding checks to prevent null pointer dereferences (diff) | |
| download | inkscape-aeb9c1bde66de096910757abb17dedb94ad74207.tar.gz inkscape-aeb9c1bde66de096910757abb17dedb94ad74207.zip | |
Trunk merge
(bzr r11073.1.29)
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 |
