summaryrefslogtreecommitdiffstats
path: root/src/dropper-context.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/dropper-context.cpp')
-rw-r--r--src/dropper-context.cpp17
1 files changed, 8 insertions, 9 deletions
diff --git a/src/dropper-context.cpp b/src/dropper-context.cpp
index d513dd587..dcb1ab66c 100644
--- a/src/dropper-context.cpp
+++ b/src/dropper-context.cpp
@@ -19,6 +19,7 @@
#include <gdk/gdk.h>
#include <gdk/gdkkeysyms.h>
#include <2geom/transforms.h>
+#include <2geom/circle.h>
#include "macros.h"
#include "display/canvas-bpath.h"
@@ -92,16 +93,14 @@ SPDropperContext::~SPDropperContext() {
void SPDropperContext::setup() {
SPEventContext::setup();
- /* TODO: have a look at sp_dyna_draw_context_setup where the same is done.. generalize? at least make it an arcto! */
- SPCurve *c = new SPCurve();
- const double C1 = 0.552;
- c->moveto(-1,0);
- c->curveto(-1, C1, -C1, 1, 0, 1 );
- c->curveto(C1, 1, 1, C1, 1, 0 );
- c->curveto(1, -C1, C1, -1, 0, -1 );
- c->curveto(-C1, -1, -1, -C1, -1, 0 );
- c->closepath();
+ /* TODO: have a look at SPDynaDrawContext::setup where the same is done.. generalize? */
+ Geom::PathVector path;
+ Geom::Circle(0, 0, 1).getPath(path);
+
+ SPCurve *c = new SPCurve(path);
+
this->area = sp_canvas_bpath_new(sp_desktop_controls(this->desktop), c);
+
c->unref();
sp_canvas_bpath_set_fill(SP_CANVAS_BPATH(this->area), 0x00000000,(SPWindRule)0);