From 13c192e2fa564c0a743e13e30b1cf6de9b1a39a6 Mon Sep 17 00:00:00 2001 From: "Liam P. White" Date: Wed, 12 Mar 2014 08:56:04 -0400 Subject: Reverted swatches Removed a toy effect (not ready yet) Fixed a bug with Livarot General cleanup (bzr r13090.1.23) --- src/display/drawing-item.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'src/display/drawing-item.cpp') diff --git a/src/display/drawing-item.cpp b/src/display/drawing-item.cpp index 13e7b61eb..6c7f99d42 100644 --- a/src/display/drawing-item.cpp +++ b/src/display/drawing-item.cpp @@ -808,9 +808,10 @@ DrawingItem::pick(Geom::Point const &p, double delta, unsigned flags) { // Sometimes there's no BBOX in state, reason unknown (bug 992817) // I made this not an assert to remove the warning + // This warning clutters the console output, so commented out if (!(_state & STATE_BBOX) || !(_state & STATE_PICK)) { - g_warning("Invalid state when picking: STATE_BBOX = %d, STATE_PICK = %d", - _state & STATE_BBOX, _state & STATE_PICK); + /*g_warning("Invalid state when picking: STATE_BBOX = %d, STATE_PICK = %d", + _state & STATE_BBOX, _state & STATE_PICK);*/ return NULL; } // ignore invisible and insensitive items unless sticky -- cgit v1.2.3 From 8b31d0e28a6cf0f916f5267c54fed76c712c48a3 Mon Sep 17 00:00:00 2001 From: Tavmjong Bah Date: Fri, 1 Aug 2014 10:13:43 +0200 Subject: Rename 'blend-mode' property to 'mix-blend-mode' per CSS spec. (bzr r13341.1.113) --- src/display/drawing-item.cpp | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) (limited to 'src/display/drawing-item.cpp') diff --git a/src/display/drawing-item.cpp b/src/display/drawing-item.cpp index 0bfb00b62..80eb69546 100644 --- a/src/display/drawing-item.cpp +++ b/src/display/drawing-item.cpp @@ -127,7 +127,7 @@ DrawingItem::DrawingItem(Drawing &drawing) , _pick_children(0) , _antialias(1) , _isolation(SP_CSS_ISOLATION_AUTO) - , _blend_mode(SP_CSS_BLEND_NORMAL) + , _mix_blend_mode(SP_CSS_BLEND_NORMAL) {} DrawingItem::~DrawingItem() @@ -291,10 +291,10 @@ DrawingItem::setIsolation(unsigned isolation) } void -DrawingItem::setBlendMode(unsigned blend_mode) +DrawingItem::setBlendMode(unsigned mix_blend_mode) { - _blend_mode = blend_mode; - //if( blend_mode != 0 ) std::cout << "setBlendMode: " << blend_mode << std::endl; + _mix_blend_mode = mix_blend_mode; + //if( mix_blend_mode != 0 ) std::cout << "setBlendMode: " << mix_blend_mode << std::endl; _markForRendering(); } @@ -592,7 +592,7 @@ DrawingItem::render(DrawingContext &dc, Geom::IntRect const &area, unsigned flag if (_cached) { if (_cache) { _cache->prepare(); - set_cairo_blend_operator( dc, _blend_mode ); + set_cairo_blend_operator( dc, _mix_blend_mode ); _cache->paintFromCache(dc, carea); if (!carea) return RENDER_OK; @@ -622,7 +622,7 @@ DrawingItem::render(DrawingContext &dc, Geom::IntRect const &area, unsigned flag nir |= (_filter != NULL && render_filters); // 3. it has a filter nir |= needs_opacity; // 4. it is non-opaque nir |= (_cache != NULL); // 5. it is cached - nir |= (_blend_mode != SP_CSS_BLEND_NORMAL); // 6. Blend mode not normal + nir |= (_mix_blend_mode != SP_CSS_BLEND_NORMAL); // 6. Blend mode not normal nir |= (_isolation == SP_CSS_ISOLATION_ISOLATE); // 7. Explicit isolatiom /* How the rendering is done. @@ -735,7 +735,7 @@ DrawingItem::render(DrawingContext &dc, Geom::IntRect const &area, unsigned flag } dc.rectangle(*carea); dc.setSource(&intermediate); - set_cairo_blend_operator( dc, _blend_mode ); + set_cairo_blend_operator( dc, _mix_blend_mode ); dc.fill(); dc.setSource(0,0,0,0); // the call above is to clear a ref on the intermediate surface held by dc -- cgit v1.2.3 From a5e84125b62bf41871b57d93e457db81ee139485 Mon Sep 17 00:00:00 2001 From: "Liam P. White" Date: Mon, 18 Aug 2014 17:18:05 -0400 Subject: Fix build (not pretty). (bzr r13341.1.146) --- src/display/drawing-item.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'src/display/drawing-item.cpp') diff --git a/src/display/drawing-item.cpp b/src/display/drawing-item.cpp index 80eb69546..bd6fb41d8 100644 --- a/src/display/drawing-item.cpp +++ b/src/display/drawing-item.cpp @@ -10,8 +10,7 @@ */ #include -#include "display/cairo-utils.h" -#include "display/cairo-templates.h" + #include "display/drawing.h" #include "display/drawing-context.h" #include "display/drawing-item.h" @@ -21,6 +20,9 @@ #include "preferences.h" #include "style.h" +#include "display/cairo-utils.h" +#include "display/cairo-templates.h" + namespace Inkscape { void set_cairo_blend_operator( DrawingContext &dc, unsigned blend_mode ) { -- cgit v1.2.3