Code

NR::Maybe => boost::optional
[inkscape.git] / src / display / nr-filter-image.cpp
index 42b78fa16ad2ec4e244d59b973a17cc14d933b89..65958f0d216c5b08c5e1d1f897bbc5018148e1bf 100644 (file)
@@ -40,7 +40,7 @@ FilterImage::~FilterImage()
 int FilterImage::render(FilterSlot &slot, FilterUnits const &units) {
     if (!feImageHref) return 0;
 
-    NRPixBlock* pb;
+    NRPixBlock* pb = NULL;
     bool free_pb_on_exit = false;
 
     if(from_element){
@@ -62,7 +62,7 @@ int FilterImage::render(FilterSlot &slot, FilterUnits const &units) {
         Matrix identity(1.0, 0.0,
                    0.0, 1.0,
                    0.0, 0.0);
-        NR::Maybe<NR::Rect> area = SVGElem->getBounds(identity);
+        boost::optional<NR::Rect> area = SVGElem->getBounds(identity);
         
         NRRectL rect;
         rect.x0=area->min()[NR::X];
@@ -80,10 +80,9 @@ int FilterImage::render(FilterSlot &slot, FilterUnits const &units) {
         NRGC gc(NULL);
         /* Update to renderable state */
         double sf = 1.0;
-        NRMatrix t;
-        nr_matrix_set_scale(&t, sf, sf);
+        NR::Matrix t(NR::scale(sf, sf));
         nr_arena_item_set_transform(ai, &t);
-        nr_matrix_set_identity(&gc.transform);
+        gc.transform.set_identity();
         nr_arena_item_invoke_update( ai, NULL, &gc,
                                              NR_ARENA_ITEM_STATE_ALL,
                                              NR_ARENA_ITEM_STATE_NONE );