diff options
| author | Johan B. C. Engelen <jbc.engelen@swissonline.ch> | 2008-08-08 17:32:43 +0000 |
|---|---|---|
| committer | johanengelen <johanengelen@users.sourceforge.net> | 2008-08-08 17:32:43 +0000 |
| commit | 43dc21b53e642208542398d7d257d0f9cb48582f (patch) | |
| tree | 75510653a1989316dad1df9b3d9bc9230264281c /src/widgets/icon.cpp | |
| parent | Fixed svg-path (and display/curve) tests to properly handle closepath and mad... (diff) | |
| download | inkscape-43dc21b53e642208542398d7d257d0f9cb48582f.tar.gz inkscape-43dc21b53e642208542398d7d257d0f9cb48582f.zip | |
remove many unnecessary to_2geom and from_2geom calls
(bzr r6593)
Diffstat (limited to 'src/widgets/icon.cpp')
| -rw-r--r-- | src/widgets/icon.cpp | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/src/widgets/icon.cpp b/src/widgets/icon.cpp index b460258ed..cdd356871 100644 --- a/src/widgets/icon.cpp +++ b/src/widgets/icon.cpp @@ -623,7 +623,11 @@ sp_icon_doc_icon( SPDocument *doc, NRArenaItem *root, if (object && SP_IS_ITEM(object)) { /* Find bbox in document */ Geom::Matrix const i2doc(sp_item_i2doc_affine(SP_ITEM(object))); - boost::optional<Geom::Rect> dbox = SP_ITEM(object)->getBounds(i2doc); + boost::optional<NR::Rect> nrdbox = SP_ITEM(object)->getBounds(i2doc); + boost::optional<Geom::Rect> dbox; + if (nrdbox) { + dbox = to_2geom(*nrdbox); + } if ( SP_OBJECT_PARENT(object) == NULL ) { @@ -636,7 +640,7 @@ sp_icon_doc_icon( SPDocument *doc, NRArenaItem *root, NRGC gc(NULL); /* Update to renderable state */ double sf = 1.0; - nr_arena_item_set_transform(root, from_2geom(Geom::Scale(sf, sf))); + nr_arena_item_set_transform(root, (Geom::Matrix)Geom::Scale(sf, sf)); gc.transform.set_identity(); nr_arena_item_invoke_update( root, NULL, &gc, NR_ARENA_ITEM_STATE_ALL, @@ -668,7 +672,7 @@ sp_icon_doc_icon( SPDocument *doc, NRArenaItem *root, } sf = (double)psize / (double)block; - nr_arena_item_set_transform(root, from_2geom(Geom::Scale(sf, sf))); + nr_arena_item_set_transform(root, (Geom::Matrix)Geom::Scale(sf, sf)); gc.transform.set_identity(); nr_arena_item_invoke_update( root, NULL, &gc, NR_ARENA_ITEM_STATE_ALL, |
