diff options
| author | Jabier Arraiza Cenoz <jabier.arraiza@marker.es> | 2014-04-01 17:00:00 +0000 |
|---|---|---|
| committer | Jabiertxof <jtx@jtx.marker.es> | 2014-04-01 17:00:00 +0000 |
| commit | 208ccdf9782984702f79b8ba416e67dd1e2c2dfa (patch) | |
| tree | 79d15123aa526c49c6386db6245fbfc6b7a63eaf /src/ui/tools/flood-tool.cpp | |
| parent | update to trunk (diff) | |
| parent | partial 2geom update: (diff) | |
| download | inkscape-208ccdf9782984702f79b8ba416e67dd1e2c2dfa.tar.gz inkscape-208ccdf9782984702f79b8ba416e67dd1e2c2dfa.zip | |
update to trunk
(bzr r12588.1.32)
Diffstat (limited to 'src/ui/tools/flood-tool.cpp')
| -rw-r--r-- | src/ui/tools/flood-tool.cpp | 27 |
1 files changed, 11 insertions, 16 deletions
diff --git a/src/ui/tools/flood-tool.cpp b/src/ui/tools/flood-tool.cpp index 0b72bc9f2..d74848dc6 100644 --- a/src/ui/tools/flood-tool.cpp +++ b/src/ui/tools/flood-tool.cpp @@ -94,17 +94,12 @@ const std::string& FloodTool::getPrefsPath() { const std::string FloodTool::prefsPath = "/tools/paintbucket"; -FloodTool::FloodTool() : ToolBase() { - this->cursor_shape = cursor_paintbucket_xpm; - this->hot_x = 11; - this->hot_y = 30; - this->xp = 0; - this->yp = 0; +FloodTool::FloodTool() + : ToolBase(cursor_paintbucket_xpm, 11, 30) + , item(NULL) +{ + // TODO: Why does the flood tool use a hardcoded tolerance instead of a pref? this->tolerance = 4; - this->within_tolerance = false; - this->item_to_select = NULL; - - this->item = NULL; } FloodTool::~FloodTool() { @@ -794,7 +789,7 @@ static void sp_flood_do_flood_fill(ToolBase *event_context, GdkEvent *event, boo cairo_surface_t *s = cairo_image_surface_create_for_data( px, CAIRO_FORMAT_ARGB32, width, height, stride); - Inkscape::DrawingContext ct(s, Geom::Point(0,0)); + Inkscape::DrawingContext dc(s, Geom::Point(0,0)); // cairo_translate not necessary here - surface origin is at 0,0 SPNamedView *nv = sp_desktop_namedview(desktop); @@ -802,12 +797,12 @@ static void sp_flood_do_flood_fill(ToolBase *event_context, GdkEvent *event, boo // bgcolor is 0xrrggbbaa, we need 0xaarrggbb dtc = (bgcolor >> 8) | (bgcolor << 24); - ct.setSource(bgcolor); - ct.setOperator(CAIRO_OPERATOR_SOURCE); - ct.paint(); - ct.setOperator(CAIRO_OPERATOR_OVER); + dc.setSource(bgcolor); + dc.setOperator(CAIRO_OPERATOR_SOURCE); + dc.paint(); + dc.setOperator(CAIRO_OPERATOR_OVER); - drawing.render(ct, final_bbox); + drawing.render(dc, final_bbox); //cairo_surface_write_to_png( s, "cairo.png" ); |
