summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: a9df372)
raw | patch | inline | side by side (parent: a9df372)
author | johanengelen <johanengelen@users.sourceforge.net> | |
Wed, 6 Aug 2008 22:43:13 +0000 (22:43 +0000) | ||
committer | johanengelen <johanengelen@users.sourceforge.net> | |
Wed, 6 Aug 2008 22:43:13 +0000 (22:43 +0000) |
src/connector-context.cpp | patch | blob | history | |
src/knot-holder-entity.cpp | patch | blob | history |
index 5e2cdc2b80612d7dbd36a44a684f76c2f50e210a..871110275301960662239afb9a41828e16fa84c4 100644 (file)
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;
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]);
index 6d5f1187bb6527a97c80a0195ee247a8d6f94ffc..82ec9cf90ae9aea7a31f3ecc0a6c7669226a5e74 100644 (file)
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);
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();
}
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;
}
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;