summaryrefslogtreecommitdiffstats
path: root/src/dialogs/tiledialog.cpp
diff options
context:
space:
mode:
authorJohan B. C. Engelen <jbc.engelen@swissonline.ch>2008-08-08 17:32:43 +0000
committerjohanengelen <johanengelen@users.sourceforge.net>2008-08-08 17:32:43 +0000
commit43dc21b53e642208542398d7d257d0f9cb48582f (patch)
tree75510653a1989316dad1df9b3d9bc9230264281c /src/dialogs/tiledialog.cpp
parentFixed svg-path (and display/curve) tests to properly handle closepath and mad... (diff)
downloadinkscape-43dc21b53e642208542398d7d257d0f9cb48582f.tar.gz
inkscape-43dc21b53e642208542398d7d257d0f9cb48582f.zip
remove many unnecessary to_2geom and from_2geom calls
(bzr r6593)
Diffstat (limited to 'src/dialogs/tiledialog.cpp')
-rw-r--r--src/dialogs/tiledialog.cpp18
1 files changed, 9 insertions, 9 deletions
diff --git a/src/dialogs/tiledialog.cpp b/src/dialogs/tiledialog.cpp
index f9bde3c0b..63732df0b 100644
--- a/src/dialogs/tiledialog.cpp
+++ b/src/dialogs/tiledialog.cpp
@@ -49,8 +49,8 @@ sp_compare_x_position(SPItem *first, SPItem *second)
using NR::X;
using NR::Y;
- boost::optional<NR::Rect> a = first->getBounds(from_2geom(sp_item_i2doc_affine(first)));
- boost::optional<NR::Rect> b = second->getBounds(from_2geom(sp_item_i2doc_affine(second)));
+ boost::optional<NR::Rect> a = first->getBounds(sp_item_i2doc_affine(first));
+ boost::optional<NR::Rect> b = second->getBounds(sp_item_i2doc_affine(second));
if ( !a || !b ) {
// FIXME?
@@ -89,8 +89,8 @@ sp_compare_x_position(SPItem *first, SPItem *second)
int
sp_compare_y_position(SPItem *first, SPItem *second)
{
- boost::optional<NR::Rect> a = first->getBounds(from_2geom(sp_item_i2doc_affine(first)));
- boost::optional<NR::Rect> b = second->getBounds(from_2geom(sp_item_i2doc_affine(second)));
+ boost::optional<NR::Rect> a = first->getBounds(sp_item_i2doc_affine(first));
+ boost::optional<NR::Rect> b = second->getBounds(sp_item_i2doc_affine(second));
if ( !a || !b ) {
// FIXME?
@@ -169,7 +169,7 @@ void TileDialog::Grid_Arrange ()
cnt=0;
for (; items != NULL; items = items->next) {
SPItem *item = SP_ITEM(items->data);
- boost::optional<NR::Rect> b = item->getBounds(from_2geom(sp_item_i2doc_affine(item)));
+ boost::optional<NR::Rect> b = item->getBounds(sp_item_i2doc_affine(item));
if (!b) {
continue;
}
@@ -211,7 +211,7 @@ void TileDialog::Grid_Arrange ()
const GSList *sizes = sorted;
for (; sizes != NULL; sizes = sizes->next) {
SPItem *item = SP_ITEM(sizes->data);
- boost::optional<NR::Rect> b = item->getBounds(from_2geom(sp_item_i2doc_affine(item)));
+ boost::optional<NR::Rect> b = item->getBounds(sp_item_i2doc_affine(item));
if (b) {
width = b->dimensions()[NR::X];
height = b->dimensions()[NR::Y];
@@ -318,7 +318,7 @@ g_print("\n row = %f col = %f selection x= %f selection y = %f", total_row_h
for (; current_row != NULL; current_row = current_row->next) {
SPItem *item=SP_ITEM(current_row->data);
Inkscape::XML::Node *repr = SP_OBJECT_REPR(item);
- boost::optional<NR::Rect> b = item->getBounds(from_2geom(sp_item_i2doc_affine(item)));
+ boost::optional<NR::Rect> b = item->getBounds(sp_item_i2doc_affine(item));
NR::Point min;
if (b) {
width = b->dimensions()[NR::X];
@@ -337,8 +337,8 @@ g_print("\n row = %f col = %f selection x= %f selection y = %f", total_row_h
// signs are inverted between x and y due to y inversion
NR::Point move = NR::Point(new_x - min[NR::X], min[NR::Y] - new_y);
- NR::Matrix const &affine = NR::Matrix(NR::translate(move));
- sp_item_set_i2d_affine(item, sp_item_i2d_affine(item) * to_2geom(affine));
+ Geom::Matrix const affine = Geom::Matrix(Geom::Translate(move));
+ sp_item_set_i2d_affine(item, sp_item_i2d_affine(item) * affine);
sp_item_write_transform(item, repr, item->transform, NULL);
SP_OBJECT (current_row->data)->updateRepr();
cnt +=1;