diff options
Diffstat (limited to 'src/ui/widget')
| -rw-r--r-- | src/ui/widget/object-composite-settings.cpp | 8 | ||||
| -rw-r--r-- | src/ui/widget/style-subject.cpp | 8 | ||||
| -rw-r--r-- | src/ui/widget/style-subject.h | 7 |
3 files changed, 12 insertions, 11 deletions
diff --git a/src/ui/widget/object-composite-settings.cpp b/src/ui/widget/object-composite-settings.cpp index d4c1bb705..f2fa9bcd3 100644 --- a/src/ui/widget/object-composite-settings.cpp +++ b/src/ui/widget/object-composite-settings.cpp @@ -114,10 +114,10 @@ ObjectCompositeSettings::_blendBlurValueChanged() // FIXME: fix for GTK breakage, see comment in SelectedStyle::on_opacity_changed; here it results in crash 1580903 sp_canvas_force_full_redraw_after_interruptions(sp_desktop_canvas(desktop), 0); - boost::optional<NR::Rect> bbox = _subject->getBounds(SPItem::GEOMETRIC_BBOX); + boost::optional<Geom::Rect> bbox = _subject->getBounds(SPItem::GEOMETRIC_BBOX); double radius; if (bbox) { - double perimeter = bbox->extent(Geom::X) + bbox->extent(Geom::Y); + double perimeter = bbox->dimensions()[Geom::X] + bbox->dimensions()[Geom::Y]; // fixme: this is only half the perimeter, is that correct? radius = _fe_cb.get_blur_value() * perimeter / 400; } else { radius = 0; @@ -260,9 +260,9 @@ ObjectCompositeSettings::_subjectChanged() { case QUERY_STYLE_SINGLE: case QUERY_STYLE_MULTIPLE_AVERAGED: case QUERY_STYLE_MULTIPLE_SAME: - boost::optional<NR::Rect> bbox = _subject->getBounds(SPItem::GEOMETRIC_BBOX); + boost::optional<Geom::Rect> bbox = _subject->getBounds(SPItem::GEOMETRIC_BBOX); if (bbox) { - double perimeter = bbox->extent(Geom::X) + bbox->extent(Geom::Y); + double perimeter = bbox->dimensions()[Geom::X] + bbox->dimensions()[Geom::Y]; // fixme: this is only half the perimeter, is that correct? _fe_cb.set_blur_sensitive(true); //update blur widget value float radius = query->filter_gaussianBlur_deviation.value; diff --git a/src/ui/widget/style-subject.cpp b/src/ui/widget/style-subject.cpp index 39081b005..a2e8a2547 100644 --- a/src/ui/widget/style-subject.cpp +++ b/src/ui/widget/style-subject.cpp @@ -65,12 +65,12 @@ StyleSubject::iterator StyleSubject::Selection::begin() { } } -boost::optional<NR::Rect> StyleSubject::Selection::getBounds(SPItem::BBoxType type) { +boost::optional<Geom::Rect> StyleSubject::Selection::getBounds(SPItem::BBoxType type) { Inkscape::Selection *selection = _getSelection(); if (selection) { return selection->bounds(type); } else { - return boost::optional<NR::Rect>(); + return boost::optional<Geom::Rect>(); } } @@ -143,12 +143,12 @@ StyleSubject::iterator StyleSubject::CurrentLayer::begin() { return iterator(_getLayerSList()); } -boost::optional<NR::Rect> StyleSubject::CurrentLayer::getBounds(SPItem::BBoxType type) { +boost::optional<Geom::Rect> StyleSubject::CurrentLayer::getBounds(SPItem::BBoxType type) { SPObject *layer = _getLayer(); if (layer && SP_IS_ITEM(layer)) { return sp_item_bbox_desktop(SP_ITEM(layer), type); } else { - return boost::optional<NR::Rect>(); + return boost::optional<Geom::Rect>(); } } diff --git a/src/ui/widget/style-subject.h b/src/ui/widget/style-subject.h index 9204a8163..231a88728 100644 --- a/src/ui/widget/style-subject.h +++ b/src/ui/widget/style-subject.h @@ -12,6 +12,7 @@ #include "util/glib-list-iterators.h" #include <boost/optional.hpp> #include "libnr/nr-rect.h" +#include <2geom/rect.h> #include "sp-item.h" #include <sigc++/sigc++.h> @@ -43,7 +44,7 @@ public: virtual iterator begin() = 0; virtual iterator end() { return iterator(NULL); } - virtual boost::optional<NR::Rect> getBounds(SPItem::BBoxType type = SPItem::APPROXIMATE_BBOX) = 0; + virtual boost::optional<Geom::Rect> getBounds(SPItem::BBoxType type = SPItem::APPROXIMATE_BBOX) = 0; virtual int queryStyle(SPStyle *query, int property) = 0; virtual void setCSS(SPCSSAttr *css) = 0; @@ -66,7 +67,7 @@ public: ~Selection(); virtual iterator begin(); - virtual boost::optional<NR::Rect> getBounds(SPItem::BBoxType type = SPItem::APPROXIMATE_BBOX); + virtual boost::optional<Geom::Rect> getBounds(SPItem::BBoxType type = SPItem::APPROXIMATE_BBOX); virtual int queryStyle(SPStyle *query, int property); virtual void setCSS(SPCSSAttr *css); @@ -87,7 +88,7 @@ public: ~CurrentLayer(); virtual iterator begin(); - virtual boost::optional<NR::Rect> getBounds(SPItem::BBoxType type = SPItem::APPROXIMATE_BBOX); + virtual boost::optional<Geom::Rect> getBounds(SPItem::BBoxType type = SPItem::APPROXIMATE_BBOX); virtual int queryStyle(SPStyle *query, int property); virtual void setCSS(SPCSSAttr *css); |
