summaryrefslogtreecommitdiffstats
path: root/src/sp-rect.cpp
diff options
context:
space:
mode:
authorJohan B. C. Engelen <jbc.engelen@swissonline.ch>2011-02-02 21:24:36 +0000
committerJohan Engelen <goejendaagh@zonnet.nl>2011-02-02 21:24:36 +0000
commit53933f5fea9d07d1ba6304b88439fba257ee8c34 (patch)
tree21f94cd05346fc1236751bb1db3e0850e5aece54 /src/sp-rect.cpp
parentTranslations. French translation minor update. (diff)
downloadinkscape-53933f5fea9d07d1ba6304b88439fba257ee8c34.tar.gz
inkscape-53933f5fea9d07d1ba6304b88439fba257ee8c34.zip
update to latest 2geom !
(bzr r10025)
Diffstat (limited to 'src/sp-rect.cpp')
-rw-r--r--src/sp-rect.cpp16
1 files changed, 8 insertions, 8 deletions
diff --git a/src/sp-rect.cpp b/src/sp-rect.cpp
index 94be7551b..fd44f64df 100644
--- a/src/sp-rect.cpp
+++ b/src/sp-rect.cpp
@@ -42,7 +42,7 @@ static void sp_rect_update(SPObject *object, SPCtx *ctx, guint flags);
static Inkscape::XML::Node *sp_rect_write(SPObject *object, Inkscape::XML::Document *doc, Inkscape::XML::Node *repr, guint flags);
static gchar *sp_rect_description(SPItem *item);
-static Geom::Matrix sp_rect_set_transform(SPItem *item, Geom::Matrix const &xform);
+static Geom::Affine sp_rect_set_transform(SPItem *item, Geom::Affine const &xform);
static void sp_rect_convert_to_guides(SPItem *item);
static void sp_rect_set_shape(SPShape *shape);
@@ -333,8 +333,8 @@ sp_rect_set_ry(SPRect *rect, gboolean set, gdouble value)
/* fixme: Use preferred units somehow (Lauris) */
/* fixme: Alternately preserve whatever units there are (lauris) */
-static Geom::Matrix
-sp_rect_set_transform(SPItem *item, Geom::Matrix const &xform)
+static Geom::Affine
+sp_rect_set_transform(SPItem *item, Geom::Affine const &xform)
{
SPRect *rect = SP_RECT(item);
@@ -343,7 +343,7 @@ sp_rect_set_transform(SPItem *item, Geom::Matrix const &xform)
/* This function takes care of translation and scaling, we return whatever parts we can't
handle. */
- Geom::Matrix ret(Geom::Matrix(xform).without_translation());
+ Geom::Affine ret(Geom::Affine(xform).withoutTranslation());
gdouble const sw = hypot(ret[0], ret[1]);
gdouble const sh = hypot(ret[2], ret[3]);
if (sw > 1e-9) {
@@ -397,7 +397,7 @@ sp_rect_set_transform(SPItem *item, Geom::Matrix const &xform)
Returns the ratio in which the vector from p0 to p1 is stretched by transform
*/
static gdouble
-vector_stretch(Geom::Point p0, Geom::Point p1, Geom::Matrix xform)
+vector_stretch(Geom::Point p0, Geom::Point p1, Geom::Affine xform)
{
if (p0 == p1)
return 0;
@@ -467,7 +467,7 @@ sp_rect_get_rect (SPRect *rect)
}
void
-sp_rect_compensate_rxry(SPRect *rect, Geom::Matrix xform)
+sp_rect_compensate_rxry(SPRect *rect, Geom::Affine xform)
{
if (rect->rx.computed == 0 && rect->ry.computed == 0)
return; // nothing to compensate
@@ -570,7 +570,7 @@ static void sp_rect_snappoints(SPItem const *item, std::vector<Inkscape::SnapCan
SPRect *rect = SP_RECT(item);
- Geom::Matrix const i2d (item->i2d_affine ());
+ Geom::Affine const i2d (item->i2d_affine ());
Geom::Point p0 = Geom::Point(rect->x.computed, rect->y.computed) * i2d;
Geom::Point p1 = Geom::Point(rect->x.computed, rect->y.computed + rect->height.computed) * i2d;
@@ -609,7 +609,7 @@ sp_rect_convert_to_guides(SPItem *item) {
std::list<std::pair<Geom::Point, Geom::Point> > pts;
- Geom::Matrix const i2d (SP_ITEM(rect)->i2d_affine());
+ Geom::Affine const i2d (SP_ITEM(rect)->i2d_affine());
Geom::Point A1(Geom::Point(rect->x.computed, rect->y.computed) * i2d);
Geom::Point A2(Geom::Point(rect->x.computed, rect->y.computed + rect->height.computed) * i2d);