diff options
| author | Johan B. C. Engelen <jbc.engelen@swissonline.ch> | 2008-06-12 20:20:51 +0000 |
|---|---|---|
| committer | johanengelen <johanengelen@users.sourceforge.net> | 2008-06-12 20:20:51 +0000 |
| commit | 21f04a292dafc2cfd1374609720c458124c5b9a4 (patch) | |
| tree | 1a38adb5df88eb36bafb6d055b55faf6b0d69cba /src/dialogs | |
| parent | update 2geom (diff) | |
| download | inkscape-21f04a292dafc2cfd1374609720c458124c5b9a4.tar.gz inkscape-21f04a292dafc2cfd1374609720c458124c5b9a4.zip | |
change NR::Matrix to Geom:: for many sp_item_xxx_affine functions
(bzr r5915)
Diffstat (limited to 'src/dialogs')
| -rw-r--r-- | src/dialogs/clonetiler.cpp | 2 | ||||
| -rw-r--r-- | src/dialogs/export.cpp | 2 | ||||
| -rw-r--r-- | src/dialogs/stroke-style.cpp | 4 | ||||
| -rw-r--r-- | src/dialogs/tiledialog.cpp | 16 | ||||
| -rw-r--r-- | src/dialogs/unclump.cpp | 8 |
5 files changed, 16 insertions, 16 deletions
diff --git a/src/dialogs/clonetiler.cpp b/src/dialogs/clonetiler.cpp index 1ce08bfdf..0b433fe3b 100644 --- a/src/dialogs/clonetiler.cpp +++ b/src/dialogs/clonetiler.cpp @@ -1239,7 +1239,7 @@ clonetiler_apply( GtkWidget */*widget*/, void * ) x0 = sp_repr_get_double_attribute (obj_repr, "inkscape:tile-x0", 0); y0 = sp_repr_get_double_attribute (obj_repr, "inkscape:tile-y0", 0); } else { - NR::Maybe<NR::Rect> r = SP_ITEM(obj)->getBounds(sp_item_i2doc_affine(SP_ITEM(obj)), + NR::Maybe<NR::Rect> r = SP_ITEM(obj)->getBounds(from_2geom(sp_item_i2doc_affine(SP_ITEM(obj))), SPItem::GEOMETRIC_BBOX); /* impl: Use of GEOMETRIC_BBOX is so that the stroke of rectangles will be shared * (overlapped) rather than effectively doubled in width. diff --git a/src/dialogs/export.cpp b/src/dialogs/export.cpp index b79a4150f..0e2a08eb4 100644 --- a/src/dialogs/export.cpp +++ b/src/dialogs/export.cpp @@ -1106,7 +1106,7 @@ sp_export_export_clicked (GtkButton */*button*/, GtkObject *base) } NRRect area; - sp_item_invoke_bbox(item, &area, sp_item_i2r_affine((SPItem *) item), TRUE); + sp_item_invoke_bbox(item, &area, from_2geom(sp_item_i2r_affine((SPItem *) item)), TRUE); gint width = (gint) ((area.x1 - area.x0) * dpi / PX_PER_IN + 0.5); gint height = (gint) ((area.y1 - area.y0) * dpi / PX_PER_IN + 0.5); diff --git a/src/dialogs/stroke-style.cpp b/src/dialogs/stroke-style.cpp index 70cb84a7e..f0eccb146 100644 --- a/src/dialogs/stroke-style.cpp +++ b/src/dialogs/stroke-style.cpp @@ -614,8 +614,8 @@ sp_marker_prev_new(unsigned psize, gchar const *mname, return NULL; // sandbox broken? // Find object's bbox in document - NR::Matrix const i2doc(sp_item_i2doc_affine(SP_ITEM(object))); - NR::Maybe<NR::Rect> dbox = SP_ITEM(object)->getBounds(i2doc); + Geom::Matrix const i2doc(sp_item_i2doc_affine(SP_ITEM(object))); + NR::Maybe<NR::Rect> dbox = SP_ITEM(object)->getBounds(from_2geom(i2doc)); if (!dbox) { return NULL; diff --git a/src/dialogs/tiledialog.cpp b/src/dialogs/tiledialog.cpp index 289d42c80..0c37e5ac0 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; - NR::Maybe<NR::Rect> a = first->getBounds(sp_item_i2doc_affine(first)); - NR::Maybe<NR::Rect> b = second->getBounds(sp_item_i2doc_affine(second)); + NR::Maybe<NR::Rect> a = first->getBounds(from_2geom(sp_item_i2doc_affine(first))); + NR::Maybe<NR::Rect> b = second->getBounds(from_2geom(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) { - NR::Maybe<NR::Rect> a = first->getBounds(sp_item_i2doc_affine(first)); - NR::Maybe<NR::Rect> b = second->getBounds(sp_item_i2doc_affine(second)); + NR::Maybe<NR::Rect> a = first->getBounds(from_2geom(sp_item_i2doc_affine(first))); + NR::Maybe<NR::Rect> b = second->getBounds(from_2geom(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); - NR::Maybe<NR::Rect> b = item->getBounds(sp_item_i2doc_affine(item)); + NR::Maybe<NR::Rect> b = item->getBounds(from_2geom(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); - NR::Maybe<NR::Rect> b = item->getBounds(sp_item_i2doc_affine(item)); + NR::Maybe<NR::Rect> b = item->getBounds(from_2geom(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); - NR::Maybe<NR::Rect> b = item->getBounds(sp_item_i2doc_affine(item)); + NR::Maybe<NR::Rect> b = item->getBounds(from_2geom(sp_item_i2doc_affine(item))); NR::Point min; if (b) { width = b->dimensions()[NR::X]; @@ -338,7 +338,7 @@ 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) * affine); + sp_item_set_i2d_affine(item, sp_item_i2d_affine(item) * to_2geom(affine)); sp_item_write_transform(item, repr, item->transform, NULL); SP_OBJECT (current_row->data)->updateRepr(); cnt +=1; diff --git a/src/dialogs/unclump.cpp b/src/dialogs/unclump.cpp index eb5870d2e..73131384f 100644 --- a/src/dialogs/unclump.cpp +++ b/src/dialogs/unclump.cpp @@ -35,7 +35,7 @@ unclump_center (SPItem *item) return i->second; } - NR::Maybe<NR::Rect> r = item->getBounds(sp_item_i2d_affine(item)); + NR::Maybe<NR::Rect> r = item->getBounds(from_2geom(sp_item_i2d_affine(item))); if (r) { NR::Point const c = r->midpoint(); c_cache[SP_OBJECT_ID(item)] = c; @@ -54,7 +54,7 @@ unclump_wh (SPItem *item) if ( i != wh_cache.end() ) { wh = i->second; } else { - NR::Maybe<NR::Rect> r = item->getBounds(sp_item_i2d_affine(item)); + NR::Maybe<NR::Rect> r = item->getBounds(from_2geom(sp_item_i2d_affine(item))); if (r) { wh = r->dimensions(); wh_cache[SP_OBJECT_ID(item)] = wh; @@ -298,7 +298,7 @@ unclump_push (SPItem *from, SPItem *what, double dist) //g_print ("push %s at %g,%g from %g,%g by %g,%g, dist %g\n", SP_OBJECT_ID(what), it[NR::X],it[NR::Y], p[NR::X],p[NR::Y], by[NR::X],by[NR::Y], dist); - sp_item_set_i2d_affine(what, sp_item_i2d_affine(what) * move); + sp_item_set_i2d_affine(what, sp_item_i2d_affine(what) * to_2geom(move)); sp_item_write_transform(what, SP_OBJECT_REPR(what), what->transform, NULL); } @@ -321,7 +321,7 @@ unclump_pull (SPItem *to, SPItem *what, double dist) //g_print ("pull %s at %g,%g to %g,%g by %g,%g, dist %g\n", SP_OBJECT_ID(what), it[NR::X],it[NR::Y], p[NR::X],p[NR::Y], by[NR::X],by[NR::Y], dist); - sp_item_set_i2d_affine(what, sp_item_i2d_affine(what) * move); + sp_item_set_i2d_affine(what, sp_item_i2d_affine(what) * to_2geom(move)); sp_item_write_transform(what, SP_OBJECT_REPR(what), what->transform, NULL); } |
