diff options
| author | Liam P. White <inkscapebronyat-signgmaildotcom> | 2014-03-19 01:21:00 +0000 |
|---|---|---|
| committer | Liam P. White <inkscapebronyat-signgmaildotcom> | 2014-03-19 01:21:00 +0000 |
| commit | 255dd5fcfd51a58d04aff8e119a2fa08cf5f71cb (patch) | |
| tree | 1f8c63d7d2bf86c01f2372b47c7afb5e6dc24339 /src/display/drawing-item.cpp | |
| parent | Added in new toy effect "Taper Strokes," readded a missing header file, bugfixes (diff) | |
| parent | Fix for Bug #1291546 (Linking color profile from Document properties dialog c... (diff) | |
| download | inkscape-255dd5fcfd51a58d04aff8e119a2fa08cf5f71cb.tar.gz inkscape-255dd5fcfd51a58d04aff8e119a2fa08cf5f71cb.zip | |
Update to trunk/Fix GTK3 build errors
(bzr r13090.1.26)
Diffstat (limited to 'src/display/drawing-item.cpp')
| -rw-r--r-- | src/display/drawing-item.cpp | 30 |
1 files changed, 26 insertions, 4 deletions
diff --git a/src/display/drawing-item.cpp b/src/display/drawing-item.cpp index 6c7f99d42..ee52b4165 100644 --- a/src/display/drawing-item.cpp +++ b/src/display/drawing-item.cpp @@ -127,6 +127,7 @@ DrawingItem::DrawingItem(Drawing &drawing) , _propagate(0) // , _renders_opacity(0) , _pick_children(0) + , _antialias(1) , _isolation(SP_CSS_ISOLATION_AUTO) , _blend_mode(SP_CSS_BLEND_NORMAL) {} @@ -229,6 +230,8 @@ DrawingItem::prependChild(DrawingItem *item) void DrawingItem::clearChildren() { + if (_children.empty()) return; + _markForRendering(); // prevent children from referencing the parent during deletion // this way, children won't try to remove themselves from a list @@ -266,8 +269,19 @@ DrawingItem::setTransform(Geom::Affine const &new_trans) void DrawingItem::setOpacity(float opacity) { - _opacity = opacity; - _markForRendering(); + if (_opacity != opacity) { + _opacity = opacity; + _markForRendering(); + } +} + +void +DrawingItem::setAntialiasing(bool a) +{ + if (_antialias != a) { + _antialias = a; + _markForRendering(); + } } void @@ -289,8 +303,10 @@ DrawingItem::setBlendMode(unsigned blend_mode) void DrawingItem::setVisible(bool v) { - _visible = v; - _markForRendering(); + if (_visible != v) { + _visible = v; + _markForRendering(); + } } /// This is currently unused @@ -568,6 +584,12 @@ DrawingItem::render(DrawingContext &dc, Geom::IntRect const &area, unsigned flag Geom::OptIntRect carea = Geom::intersect(area, _drawbox); if (!carea) return RENDER_OK; + if (_antialias) { + cairo_set_antialias(dc.raw(), CAIRO_ANTIALIAS_DEFAULT); + } else { + cairo_set_antialias(dc.raw(), CAIRO_ANTIALIAS_NONE); + } + // render from cache if possible if (_cached) { if (_cache) { |
