summaryrefslogtreecommitdiffstats
path: root/src/line-geometry.cpp
diff options
context:
space:
mode:
authorJon A. Cruz <jon@joncruz.org>2012-05-09 07:54:48 +0000
committerJon A. Cruz <jon@joncruz.org>2012-05-09 07:54:48 +0000
commit0459094999e0298341ecad677464043528d1036f (patch)
treeb3645de4ef972c8a65910c4890bc6e2d55fdbab9 /src/line-geometry.cpp
parentUnified variable names as scoping now makes the code safe. (diff)
downloadinkscape-0459094999e0298341ecad677464043528d1036f.tar.gz
inkscape-0459094999e0298341ecad677464043528d1036f.zip
Centralized line creation and enhanced visibility.
(bzr r11350)
Diffstat (limited to 'src/line-geometry.cpp')
-rw-r--r--src/line-geometry.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/line-geometry.cpp b/src/line-geometry.cpp
index 39f18dca4..c88911bf4 100644
--- a/src/line-geometry.cpp
+++ b/src/line-geometry.cpp
@@ -1,5 +1,3 @@
-#define __LINE_GEOMETRY_C__
-
/*
* Routines for dealing with lines (intersections, etc.)
*
@@ -18,6 +16,9 @@
#include "desktop-handles.h"
#include "display/sp-canvas.h"
#include "display/sodipodi-ctrl.h"
+#include "ui/control-manager.h"
+
+using Inkscape::ControlManager;
namespace Box3D {
@@ -211,8 +212,7 @@ 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();
- SPCtrlLine *line = SP_CTRLLINE(sp_canvas_item_new(sp_desktop_controls(desktop), SP_TYPE_CTRLLINE, NULL));
- line->setCoords(p1, p2);
+ SPCtrlLine *line = ControlManager::getManager().createControlLine(sp_desktop_controls(desktop), p1, p2);
line->setRgba32(rgba);
sp_canvas_item_show(line);
}