summaryrefslogtreecommitdiffstats
path: root/src/vanishing-point.cpp
diff options
context:
space:
mode:
authorDenis Declara <declara91@gmail.com>2012-05-05 13:32:42 +0000
committerDenis Declara <declara91@gmail.com>2012-05-05 13:32:42 +0000
commitaeb9c1bde66de096910757abb17dedb94ad74207 (patch)
treec0adf97685b0fa8af1553b14d20601f280492762 /src/vanishing-point.cpp
parentFixed some math, so that the objects now line up correctly (diff)
parentAdding checks to prevent null pointer dereferences (diff)
downloadinkscape-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.cpp18
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