summaryrefslogtreecommitdiffstats
path: root/src/knot-holder-entity.cpp
diff options
context:
space:
mode:
authorKrzysztof Kosi??ski <tweenk.pl@gmail.com>2010-12-15 16:19:28 +0000
committerKrzysztof KosiƄski <tweenk.pl@gmail.com>2010-12-15 16:19:28 +0000
commit70201e92aa1e700d49279871f2b84082750b8ed8 (patch)
tree1886fcdf8ad20d73b92bf4f4bfd3ab1406ba4c66 /src/knot-holder-entity.cpp
parentFix mask luminance calculation, so the coeffs add up to 1 (diff)
parentWin32 post-GSoC fixups. (diff)
downloadinkscape-70201e92aa1e700d49279871f2b84082750b8ed8.tar.gz
inkscape-70201e92aa1e700d49279871f2b84082750b8ed8.zip
Merge from trunk (again)
(bzr r9508.1.72)
Diffstat (limited to 'src/knot-holder-entity.cpp')
-rw-r--r--src/knot-holder-entity.cpp15
1 files changed, 7 insertions, 8 deletions
diff --git a/src/knot-holder-entity.cpp b/src/knot-holder-entity.cpp
index c4a22d28f..767a660be 100644
--- a/src/knot-holder-entity.cpp
+++ b/src/knot-holder-entity.cpp
@@ -1,11 +1,10 @@
-#define __KNOT_HOLDER_ENTITY_C__
-
/** \file
* KnotHolderEntity definition.
*
* Authors:
* Mitsuru Oka <oka326@parkcity.ne.jp>
* Maximilian Albert <maximilian.albert@gmail.com>
+ * Abhishek Sharma
*
* Copyright (C) 1999-2001 Lauris Kaplinski
* Copyright (C) 2000-2001 Ximian, Inc.
@@ -76,7 +75,7 @@ KnotHolderEntity::~KnotHolderEntity()
void
KnotHolderEntity::update_knot()
{
- Geom::Matrix const i2d(sp_item_i2d_affine(item));
+ Geom::Matrix const i2d(item->i2d_affine());
Geom::Point dp(knot_get() * i2d);
@@ -88,7 +87,7 @@ KnotHolderEntity::update_knot()
Geom::Point
KnotHolderEntity::snap_knot_position(Geom::Point const &p)
{
- Geom::Matrix const i2d (sp_item_i2d_affine(item));
+ Geom::Matrix const i2d (item->i2d_affine());
Geom::Point s = p * i2d;
SnapManager &m = desktop->namedview->snap_manager;
@@ -102,7 +101,7 @@ KnotHolderEntity::snap_knot_position(Geom::Point const &p)
Geom::Point
KnotHolderEntity::snap_knot_position_constrained(Geom::Point const &p, Inkscape::Snapper::SnapConstraint const &constraint)
{
- Geom::Matrix const i2d (sp_item_i2d_affine(item));
+ Geom::Matrix const i2d (item->i2d_affine());
Geom::Point s = p * i2d;
SnapManager &m = desktop->namedview->snap_manager;
@@ -158,7 +157,7 @@ PatternKnotHolderEntityXY::knot_set(Geom::Point const &p, Geom::Point const &ori
if (state) {
Geom::Point const q = p_snapped - sp_pattern_extract_trans(pat);
- sp_item_adjust_pattern(item, Geom::Matrix(Geom::Translate(q)));
+ item->adjust_pattern(Geom::Matrix(Geom::Translate(q)));
}
item->requestDisplayUpdate(SP_OBJECT_MODIFIED_FLAG);
@@ -208,7 +207,7 @@ PatternKnotHolderEntityAngle::knot_set(Geom::Point const &p, Geom::Point const &
Geom::Point const t = sp_pattern_extract_trans(pat);
rot[4] = t[Geom::X];
rot[5] = t[Geom::Y];
- sp_item_adjust_pattern(item, rot, true);
+ item->adjust_pattern(rot, true);
item->requestDisplayUpdate(SP_OBJECT_MODIFIED_FLAG);
}
@@ -242,7 +241,7 @@ PatternKnotHolderEntityScale::knot_set(Geom::Point const &p, Geom::Point const &
Geom::Point const t = sp_pattern_extract_trans(pat);
rot[4] = t[Geom::X];
rot[5] = t[Geom::Y];
- sp_item_adjust_pattern(item, rot, true);
+ item->adjust_pattern(rot, true);
item->requestDisplayUpdate(SP_OBJECT_MODIFIED_FLAG);
}