From 3e26f3cb3cbdaed02dbd5d69fd0675e28d8c0419 Mon Sep 17 00:00:00 2001 From: johanengelen Date: Wed, 6 Aug 2008 22:43:13 +0000 Subject: [PATCH] fix ambiguities by implicit NR::Matrix/Geom::Matrix cast. --- src/connector-context.cpp | 10 +++++----- src/knot-holder-entity.cpp | 10 +++++----- 2 files changed, 10 insertions(+), 10 deletions(-) diff --git a/src/connector-context.cpp b/src/connector-context.cpp index 5e2cdc2b8..871110275 100644 --- a/src/connector-context.cpp +++ b/src/connector-context.cpp @@ -1165,15 +1165,15 @@ cc_set_active_conn(SPConnectorContext *cc, SPItem *item) g_assert( SP_IS_PATH(item) ); SPCurve *curve = SP_SHAPE(SP_PATH(item))->curve; - NR::Matrix i2d = from_2geom(sp_item_i2d_affine(item)); + Geom::Matrix i2d = sp_item_i2d_affine(item); if (cc->active_conn == item) { // Just adjust handle positions. - NR::Point startpt = curve->first_point() * i2d; + Geom::Point startpt = curve->first_point() * i2d; sp_knot_set_position(cc->endpt_handle[0], startpt, 0); - NR::Point endpt = curve->last_point() * i2d; + Geom::Point endpt = curve->last_point() * i2d; sp_knot_set_position(cc->endpt_handle[1], endpt, 0); return; @@ -1237,10 +1237,10 @@ cc_set_active_conn(SPConnectorContext *cc, SPItem *item) G_CALLBACK(endpt_handler), cc); } - NR::Point startpt = curve->first_point() * i2d; + Geom::Point startpt = curve->first_point() * i2d; sp_knot_set_position(cc->endpt_handle[0], startpt, 0); - NR::Point endpt = curve->last_point() * i2d; + Geom::Point endpt = curve->last_point() * i2d; sp_knot_set_position(cc->endpt_handle[1], endpt, 0); sp_knot_show(cc->endpt_handle[0]); diff --git a/src/knot-holder-entity.cpp b/src/knot-holder-entity.cpp index 6d5f1187b..82ec9cf90 100644 --- a/src/knot-holder-entity.cpp +++ b/src/knot-holder-entity.cpp @@ -77,7 +77,7 @@ KnotHolderEntity::~KnotHolderEntity() void KnotHolderEntity::update_knot() { - NR::Matrix const i2d(from_2geom(sp_item_i2d_affine(item))); + Geom::Matrix const i2d(sp_item_i2d_affine(item)); Geom::Point dp(knot_get() * i2d); @@ -89,12 +89,12 @@ KnotHolderEntity::update_knot() Geom::Point KnotHolderEntity::snap_knot_position(Geom::Point const &p) { - NR::Matrix const i2d (from_2geom(sp_item_i2d_affine(item))); + Geom::Matrix const i2d (sp_item_i2d_affine(item)); NR::Point s = p * i2d; SnapManager &m = desktop->namedview->snap_manager; m.setup(desktop, item); m.freeSnapReturnByRef(Inkscape::Snapper::SNAPPOINT_NODE, s); - return s * i2d.inverse(); + return Geom::Point(s) * i2d.inverse(); } @@ -160,7 +160,7 @@ PatternKnotHolderEntityAngle::knot_get() Geom::Point delta = Geom::Point(x,y); Geom::Point scale = sp_pattern_extract_scale(pat); gdouble theta = sp_pattern_extract_theta(pat); - delta = delta * NR::Matrix(NR::scale(scale))*NR::Matrix(NR::rotate(theta)); + delta = delta * Geom::Matrix(Geom::Scale(scale))*Geom::Matrix(Geom::Rotate(theta)); delta = delta + sp_pattern_extract_trans(pat); return delta; } @@ -233,7 +233,7 @@ PatternKnotHolderEntityScale::knot_get() gdouble x = pattern_width(pat); gdouble y = pattern_height(pat); Geom::Point delta = Geom::Point(x,y); - NR::Matrix a = pat->patternTransform; + Geom::Matrix a = pat->patternTransform; a[4] = 0; a[5] = 0; delta = delta * a; -- 2.30.2