diff options
| author | Jabier Arraiza Cenoz <jabier.arraiza@marker.es> | 2013-09-26 20:53:21 +0000 |
|---|---|---|
| committer | Jabiertxof <jtx@jtx.marker.es> | 2013-09-26 20:53:21 +0000 |
| commit | 10388486debb4c9d6482a2c754edebc0ceff3760 (patch) | |
| tree | b0939271566fa26cbf3bc100ca3c7fea624f4354 /src/dyna-draw-context.cpp | |
| parent | Compiling problem solved thaks to ~suv (diff) | |
| parent | cppcheck (diff) | |
| download | inkscape-10388486debb4c9d6482a2c754edebc0ceff3760.tar.gz inkscape-10388486debb4c9d6482a2c754edebc0ceff3760.zip | |
update to trunk
(bzr r11950.1.150)
Diffstat (limited to 'src/dyna-draw-context.cpp')
| -rw-r--r-- | src/dyna-draw-context.cpp | 15 |
1 files changed, 5 insertions, 10 deletions
diff --git a/src/dyna-draw-context.cpp b/src/dyna-draw-context.cpp index 3e35c0ac1..01f71f76a 100644 --- a/src/dyna-draw-context.cpp +++ b/src/dyna-draw-context.cpp @@ -38,6 +38,7 @@ #include <2geom/math-utils.h> #include <2geom/pathvector.h> #include <2geom/bezier-utils.h> +#include <2geom/circle.h> #include "display/curve.h" #include <glib.h> #include "macros.h" @@ -151,17 +152,11 @@ void SPDynaDrawContext::setup() { g_signal_connect(G_OBJECT(this->currentshape), "event", G_CALLBACK(sp_desktop_root_handler), this->desktop); { - /* TODO: this can be done either with an arcto, and should maybe also be put in a general file (other tools use this as well) */ - SPCurve *c = new SPCurve(); + /* TODO: have a look at SPDropperContext::setup where the same is done.. generalize? */ + Geom::PathVector path; + Geom::Circle(0, 0, 1).getPath(path); - 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(); + SPCurve *c = new SPCurve(path); this->hatch_area = sp_canvas_bpath_new(sp_desktop_controls(this->desktop), c); |
