diff options
| author | Michael Soegtrop <MSoegtrop@yahoo.de> | 2017-06-05 13:56:11 +0000 |
|---|---|---|
| committer | Michael Soegtrop <MSoegtrop@yahoo.de> | 2017-06-05 13:56:11 +0000 |
| commit | 132e83fd6f6124731dc773ae2978d115ca492ef2 (patch) | |
| tree | b561a4dbbacd7eecbdbae3fa220a353375ccecf8 /src/ui/tools/calligraphic-tool.cpp | |
| parent | updated to trunk (diff) | |
| parent | [Bug #1695016] Xaml export misses some radialGradients. (diff) | |
| download | inkscape-132e83fd6f6124731dc773ae2978d115ca492ef2.tar.gz inkscape-132e83fd6f6124731dc773ae2978d115ca492ef2.zip | |
merged with latest version of lpe-bool and trunk
(bzr r14862.2.3)
Diffstat (limited to 'src/ui/tools/calligraphic-tool.cpp')
| -rw-r--r-- | src/ui/tools/calligraphic-tool.cpp | 24 |
1 files changed, 9 insertions, 15 deletions
diff --git a/src/ui/tools/calligraphic-tool.cpp b/src/ui/tools/calligraphic-tool.cpp index 28195eb75..7228a52bc 100644 --- a/src/ui/tools/calligraphic-tool.cpp +++ b/src/ui/tools/calligraphic-tool.cpp @@ -23,8 +23,6 @@ #define noDYNA_DRAW_VERBOSE -#include "config.h" - #include <gtk/gtk.h> #include <gdk/gdkkeysyms.h> #include <glibmm/i18n.h> @@ -35,12 +33,10 @@ #include "svg/svg.h" #include "display/canvas-bpath.h" #include "display/cairo-utils.h" -#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" #include "document.h" #include "document-undo.h" @@ -50,25 +46,21 @@ #include "desktop-style.h" #include "message-context.h" -#include "preferences.h" #include "pixmaps/cursor-calligraphy.xpm" -#include "xml/repr.h" #include "context-fns.h" -#include "sp-item.h" #include "inkscape.h" -#include "color.h" #include "splivarot.h" #include "sp-item-group.h" #include "sp-shape.h" #include "sp-path.h" #include "sp-text.h" #include "display/sp-canvas.h" -#include "display/canvas-bpath.h" #include "display/canvas-arena.h" #include "livarot/Shape.h" #include "verbs.h" #include "ui/tools/calligraphic-tool.h" +#include "ui/tools/freehand-base.h" using Inkscape::DocumentUndo; @@ -144,7 +136,7 @@ void CalligraphicTool::setup() { SPCurve *c = new SPCurve(path); - this->hatch_area = sp_canvas_bpath_new(this->desktop->getControls(), c); + this->hatch_area = sp_canvas_bpath_new(this->desktop->getControls(), c, true); c->unref(); @@ -780,6 +772,8 @@ bool CalligraphicTool::root_handler(GdkEvent* event) { this->message_context->clear(); ret = TRUE; + } else if (!this->dragging && event->button.button == 1 && !this->space_panning){ + spdc_create_single_dot(this, this->desktop->w2d(motion_w), "/tools/calligraphic", event->button.state); } break; } @@ -930,10 +924,10 @@ void CalligraphicTool::set_to_accumulated(bool unionize, bool subtract) { if (unionize) { desktop->getSelection()->add(this->repr); - sp_selected_path_union_skip_undo(desktop->getSelection(), desktop); + desktop->getSelection()->pathUnion(true); } else if (subtract) { desktop->getSelection()->add(this->repr); - sp_selected_path_diff_skip_undo(desktop->getSelection(), desktop); + desktop->getSelection()->pathDiff(true); } else { if (this->keep_selected) { desktop->getSelection()->set(this->repr); @@ -1099,7 +1093,7 @@ void CalligraphicTool::fit_and_split(bool release) { add_cap(this->currentcurve, b2[0], b1[0], this->cap_rounding); } this->currentcurve->closepath(); - sp_canvas_bpath_set_bpath(SP_CANVAS_BPATH(this->currentshape), this->currentcurve); + sp_canvas_bpath_set_bpath(SP_CANVAS_BPATH(this->currentshape), this->currentcurve, true); } /* Current calligraphic */ @@ -1135,7 +1129,7 @@ void CalligraphicTool::fit_and_split(bool release) { SP_TYPE_CANVAS_BPATH, NULL); SPCurve *curve = this->currentcurve->copy(); - sp_canvas_bpath_set_bpath(SP_CANVAS_BPATH (cbp), curve); + sp_canvas_bpath_set_bpath(SP_CANVAS_BPATH (cbp), curve, true); curve->unref(); guint32 fillColor = sp_desktop_get_color_tool (desktop, "/tools/calligraphic", true); @@ -1179,7 +1173,7 @@ void CalligraphicTool::draw_temporary_box() { } this->currentcurve->closepath(); - sp_canvas_bpath_set_bpath(SP_CANVAS_BPATH(this->currentshape), this->currentcurve); + sp_canvas_bpath_set_bpath(SP_CANVAS_BPATH(this->currentshape), this->currentcurve, true); } } |
