summaryrefslogtreecommitdiffstats
path: root/src/display
diff options
context:
space:
mode:
authorsu_v <suv-sf@users.sourceforge.net>2014-07-19 21:22:12 +0000
committer~suv <suv-sf@users.sourceforge.net>2014-07-19 21:22:12 +0000
commitdb8282d8518263885625d9c19aefad1bdbb175d4 (patch)
tree911a397de0ac4588c2475e6bc3d9310ad3e92d2a /src/display
parentupdate to trunk (r13425) (diff)
parentWarnings cleaup. (diff)
downloadinkscape-db8282d8518263885625d9c19aefad1bdbb175d4.tar.gz
inkscape-db8282d8518263885625d9c19aefad1bdbb175d4.zip
update to trunk (r13454)
(bzr r13398.1.4)
Diffstat (limited to 'src/display')
-rw-r--r--src/display/drawing-text.cpp23
-rw-r--r--src/display/nr-filter-blend.cpp9
-rw-r--r--src/display/nr-filter-blend.h2
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,
};