diff options
Diffstat (limited to 'src/display')
| -rw-r--r-- | src/display/drawing-text.cpp | 23 | ||||
| -rw-r--r-- | src/display/nr-filter-blend.cpp | 9 | ||||
| -rw-r--r-- | src/display/nr-filter-blend.h | 2 |
3 files changed, 14 insertions, 20 deletions
diff --git a/src/display/drawing-text.cpp b/src/display/drawing-text.cpp index 05a2c3c2a..9f3b447df 100644 --- a/src/display/drawing-text.cpp +++ b/src/display/drawing-text.cpp @@ -150,25 +150,26 @@ unsigned DrawingGlyphs::_updateItem(Geom::IntRect const &/*area*/, UpdateContext return STATE_ALL; } -DrawingItem * -DrawingGlyphs::_pickItem(Geom::Point const &p, double delta, unsigned /*flags*/) +DrawingItem *DrawingGlyphs::_pickItem(Geom::Point const &p, double /*delta*/, unsigned /*flags*/) { DrawingText *ggroup = dynamic_cast<DrawingText *>(_parent); if (!ggroup) { throw InvalidItemException(); } + DrawingItem *result = NULL; bool invisible = (ggroup->_nrstyle.fill.type == NRStyle::PAINT_NONE) && (ggroup->_nrstyle.stroke.type == NRStyle::PAINT_NONE); - if (!_font || !_bbox || (!_drawing.outline() && invisible) ) { - return NULL; - } - // With text we take a simple approach: pick if the point is in a character bbox - Geom::Rect expanded(_pick_bbox); - // FIXME, why expand by delta? When is the next line needed? - // expanded.expandBy(delta); - if (expanded.contains(p)) return this; - return NULL; + if (_font && _bbox && (_drawing.outline() || !invisible) ) { + // With text we take a simple approach: pick if the point is in a character bbox + Geom::Rect expanded(_pick_bbox); + // FIXME, why expand by delta? When is the next line needed? + // expanded.expandBy(delta); + if (expanded.contains(p)) { + result = this; + } + } + return result; } diff --git a/src/display/nr-filter-blend.cpp b/src/display/nr-filter-blend.cpp index 099816bce..25aea6f13 100644 --- a/src/display/nr-filter-blend.cpp +++ b/src/display/nr-filter-blend.cpp @@ -83,8 +83,7 @@ void FilterBlend::render_cairo(FilterSlot &slot) case BLEND_LIGHTEN: cairo_set_operator(out_ct, CAIRO_OPERATOR_LIGHTEN); break; -#ifdef WITH_CSSBLEND - // NEW + // New in CSS Compositing and Blending Level 1 case BLEND_OVERLAY: cairo_set_operator(out_ct, CAIRO_OPERATOR_OVERLAY); break; @@ -118,7 +117,6 @@ void FilterBlend::render_cairo(FilterSlot &slot) case BLEND_LUMINOSITY: cairo_set_operator(out_ct, CAIRO_OPERATOR_HSL_LUMINOSITY); break; -#endif case BLEND_NORMAL: default: @@ -167,15 +165,12 @@ void FilterBlend::set_input(int input, int slot) { void FilterBlend::set_mode(FilterBlendMode mode) { if (mode == BLEND_NORMAL || mode == BLEND_MULTIPLY || mode == BLEND_SCREEN || mode == BLEND_DARKEN || - mode == BLEND_LIGHTEN -#ifdef WITH_CSSBLEND - || mode == BLEND_OVERLAY || + mode == BLEND_LIGHTEN || mode == BLEND_OVERLAY || mode == BLEND_COLORDODGE || mode == BLEND_COLORBURN || mode == BLEND_HARDLIGHT || mode == BLEND_SOFTLIGHT || mode == BLEND_DIFFERENCE || mode == BLEND_EXCLUSION || mode == BLEND_HUE || mode == BLEND_SATURATION || mode == BLEND_COLOR || mode == BLEND_LUMINOSITY -#endif ) { _blend_mode = mode; diff --git a/src/display/nr-filter-blend.h b/src/display/nr-filter-blend.h index 0a2927d87..c0504993b 100644 --- a/src/display/nr-filter-blend.h +++ b/src/display/nr-filter-blend.h @@ -28,7 +28,6 @@ enum FilterBlendMode { BLEND_SCREEN, BLEND_DARKEN, BLEND_LIGHTEN, -#ifdef WITH_CSSBLEND // New in CSS Compositing and Blending Level 1 BLEND_OVERLAY, BLEND_COLORDODGE, @@ -41,7 +40,6 @@ enum FilterBlendMode { BLEND_SATURATION, BLEND_COLOR, BLEND_LUMINOSITY, -#endif BLEND_ENDMODE, }; |
