diff options
| author | Markus Engel <markus.engel@tum.de> | 2013-09-24 22:47:22 +0000 |
|---|---|---|
| committer | Markus Engel <markus.engel@tum.de> | 2013-09-24 22:47:22 +0000 |
| commit | 22548e97b7fd38308c9aacea4c865491d84562a6 (patch) | |
| tree | 249c35a5a87f2f5be1d028eddbec04fe9344a623 /src/dyna-draw-context.cpp | |
| parent | Refactored SPSpiral. (diff) | |
| download | inkscape-22548e97b7fd38308c9aacea4c865491d84562a6.tar.gz inkscape-22548e97b7fd38308c9aacea4c865491d84562a6.zip | |
Simplified some in-code circle creation.
(bzr r11608.1.131)
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); |
