summaryrefslogtreecommitdiffstats
path: root/src/knot-holder-entity.cpp
diff options
context:
space:
mode:
authorAbhishek Sharma Public <spyzerdotabhishek0at-signgmaildotcom>2010-06-29 18:05:42 +0000
committerAbhishek Sharma Public <spyzerdotabhishek0at-signgmaildotcom>2010-06-29 18:05:42 +0000
commit8867de5daf309e4cdd3fce177b408618490be4f3 (patch)
tree19a528d472e7a63f9cab97daa5c979d977db821b /src/knot-holder-entity.cpp
parentminor fix in Dutch translation of win32 installer (diff)
downloadinkscape-8867de5daf309e4cdd3fce177b408618490be4f3.tar.gz
inkscape-8867de5daf309e4cdd3fce177b408618490be4f3.zip
This is the first c++ification commit from me. It handles sp-line, sp-polyline, sp-item and marks the onset of document c++ification as well. Users can check performace increase with [/usr/bin/time -v inkscape_binary_with_commandline_options].
(bzr r9546.1.1)
Diffstat (limited to 'src/knot-holder-entity.cpp')
-rw-r--r--src/knot-holder-entity.cpp12
1 files changed, 6 insertions, 6 deletions
diff --git a/src/knot-holder-entity.cpp b/src/knot-holder-entity.cpp
index 2d0d5eb02..9e3a3babc 100644
--- a/src/knot-holder-entity.cpp
+++ b/src/knot-holder-entity.cpp
@@ -77,7 +77,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);
@@ -89,7 +89,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;
@@ -103,7 +103,7 @@ KnotHolderEntity::snap_knot_position(Geom::Point const &p)
Geom::Point
KnotHolderEntity::snap_knot_position_constrained(Geom::Point const &p, Inkscape::Snapper::ConstraintLine 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;
@@ -170,7 +170,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);
@@ -220,7 +220,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);
}
@@ -254,7 +254,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);
}