summaryrefslogtreecommitdiffstats
path: root/src/ui/tools/freehand-base.cpp
diff options
context:
space:
mode:
authorJabier Arraiza Cenoz <jabier.arraiza@marker.es>2014-04-01 17:00:00 +0000
committerJabiertxof <jtx@jtx.marker.es>2014-04-01 17:00:00 +0000
commit208ccdf9782984702f79b8ba416e67dd1e2c2dfa (patch)
tree79d15123aa526c49c6386db6245fbfc6b7a63eaf /src/ui/tools/freehand-base.cpp
parentupdate to trunk (diff)
parentpartial 2geom update: (diff)
downloadinkscape-208ccdf9782984702f79b8ba416e67dd1e2c2dfa.tar.gz
inkscape-208ccdf9782984702f79b8ba416e67dd1e2c2dfa.zip
update to trunk
(bzr r12588.1.32)
Diffstat (limited to 'src/ui/tools/freehand-base.cpp')
-rw-r--r--src/ui/tools/freehand-base.cpp60
1 files changed, 28 insertions, 32 deletions
diff --git a/src/ui/tools/freehand-base.cpp b/src/ui/tools/freehand-base.cpp
index b80a3a503..df2e6f517 100644
--- a/src/ui/tools/freehand-base.cpp
+++ b/src/ui/tools/freehand-base.cpp
@@ -72,37 +72,31 @@ static void spdc_flush_white(FreehandBase *dc, SPCurve *gc);
static void spdc_reset_white(FreehandBase *dc);
static void spdc_free_colors(FreehandBase *dc);
-FreehandBase::FreehandBase() : ToolBase() {
- this->selection = 0;
- this->grab = 0;
- this->anchor_statusbar = false;
-
- this->attach = FALSE;
-
- this->red_color = 0xff00007f;
- this->blue_color = 0x0000ff7f;
- this->green_color = 0x00ff007f;
- this->red_curve_is_valid = false;
-
- this->red_bpath = NULL;
- this->red_curve = NULL;
-
- this->blue_bpath = NULL;
- this->blue_curve = NULL;
-
- this->green_bpaths = NULL;
- this->green_curve = NULL;
- this->green_anchor = NULL;
- this->green_closed = false;
-
- this->white_item = NULL;
- this->white_curves = NULL;
- this->white_anchors = NULL;
-
- this->sa = NULL;
- this->ea = NULL;
-
- this->waiting_LPE_type = Inkscape::LivePathEffect::INVALID_LPE;
+FreehandBase::FreehandBase(gchar const *const *cursor_shape, gint hot_x, gint hot_y)
+ : ToolBase(cursor_shape, hot_x, hot_y)
+ , selection(NULL)
+ , grab(NULL)
+ , attach(false)
+ , red_color(0xff00007f)
+ , blue_color(0x0000ff7f)
+ , green_color(0x00ff007f)
+ , red_bpath(NULL)
+ , red_curve(NULL)
+ , blue_bpath(NULL)
+ , blue_curve(NULL)
+ , green_bpaths(NULL)
+ , green_curve(NULL)
+ , green_anchor(NULL)
+ , green_closed(false)
+ , white_item(NULL)
+ , white_curves(NULL)
+ , white_anchors(NULL)
+ , sa(NULL)
+ , ea(NULL)
+ , waiting_LPE_type(Inkscape::LivePathEffect::INVALID_LPE)
+ , red_curve_is_valid(false)
+ , anchor_statusbar(false)
+{
}
FreehandBase::~FreehandBase() {
@@ -169,6 +163,8 @@ void FreehandBase::finish() {
}
spdc_free_colors(this);
+
+ ToolBase::finish();
}
void FreehandBase::set(const Inkscape::Preferences::Entry& /*value*/) {
@@ -470,7 +466,7 @@ static void spdc_check_for_and_apply_waiting_LPE(FreehandBase *dc, SPItem *item,
}
}
if (SP_IS_PEN_CONTEXT(dc)) {
- sp_pen_context_set_polyline_mode(SP_PEN_CONTEXT(dc));
+ SP_PEN_CONTEXT(dc)->setPolylineMode();
}
}
}