summaryrefslogtreecommitdiffstats
path: root/src/knot-holder-entity.cpp
diff options
context:
space:
mode:
authorTomasz Boczkowski <penginsbacon@gmail.com>2015-04-25 12:59:51 +0000
committerTomasz Boczkowski <penginsbacon@gmail.com>2015-04-25 12:59:51 +0000
commit3eb2b94eded9236bea634cd28eae13a3645a8cfb (patch)
treef89f5fc023b87e5127ed57a1fc22c6d21e88fbd0 /src/knot-holder-entity.cpp
parentmerged SPColorSlider c++-sification from svgpaints branch (diff)
parentSPPattern c++-sification: class fields are private (diff)
downloadinkscape-3eb2b94eded9236bea634cd28eae13a3645a8cfb.tar.gz
inkscape-3eb2b94eded9236bea634cd28eae13a3645a8cfb.zip
merged SPPattern c++-sification from svgpaints branch
(bzr r14059.1.2)
Diffstat (limited to 'src/knot-holder-entity.cpp')
-rw-r--r--src/knot-holder-entity.cpp18
1 files changed, 9 insertions, 9 deletions
diff --git a/src/knot-holder-entity.cpp b/src/knot-holder-entity.cpp
index b66156b09..69ee4017e 100644
--- a/src/knot-holder-entity.cpp
+++ b/src/knot-holder-entity.cpp
@@ -140,19 +140,19 @@ KnotHolderEntity::snap_knot_position_constrained(Geom::Point const &p, Inkscape:
static gdouble sp_pattern_extract_theta(SPPattern const *pat)
{
- Geom::Affine transf = pat->patternTransform;
+ Geom::Affine transf = pat->get_transform();
return Geom::atan2(transf.xAxis());
}
static Geom::Point sp_pattern_extract_scale(SPPattern const *pat)
{
- Geom::Affine transf = pat->patternTransform;
+ Geom::Affine transf = pat->get_transform();
return Geom::Point( transf.expansionX(), transf.expansionY() );
}
static Geom::Point sp_pattern_extract_trans(SPPattern const *pat)
{
- return Geom::Point(pat->patternTransform[4], pat->patternTransform[5]);
+ return Geom::Point(pat->get_transform()[4], pat->get_transform()[5]);
}
void
@@ -191,7 +191,7 @@ PatternKnotHolderEntityAngle::knot_get() const
{
SPPattern *pat = _fill ? SP_PATTERN(item->style->getFillPaintServer()) : SP_PATTERN(item->style->getStrokePaintServer());
- gdouble x = pattern_width(pat);
+ gdouble x = pat->get_width();
gdouble y = 0;
Geom::Point delta = Geom::Point(x,y);
Geom::Point scale = sp_pattern_extract_scale(pat);
@@ -240,8 +240,8 @@ PatternKnotHolderEntityScale::knot_set(Geom::Point const &p, Geom::Point const &
// Get the new scale from the position of the knotholder
Geom::Point d = p_snapped - sp_pattern_extract_trans(pat);
- gdouble pat_x = pattern_width(pat);
- gdouble pat_y = pattern_height(pat);
+ gdouble pat_x = pat->get_width();
+ gdouble pat_y = pat->get_height();
Geom::Scale scl(1);
if ( state & GDK_CONTROL_MASK ) {
// if ctrl is pressed: use 1:1 scaling
@@ -267,10 +267,10 @@ PatternKnotHolderEntityScale::knot_get() const
{
SPPattern *pat = _fill ? SP_PATTERN(item->style->getFillPaintServer()) : SP_PATTERN(item->style->getStrokePaintServer());
- gdouble x = pattern_width(pat);
- gdouble y = pattern_height(pat);
+ gdouble x = pat->get_width();
+ gdouble y = pat->get_height();
Geom::Point delta = Geom::Point(x,y);
- Geom::Affine a = pat->patternTransform;
+ Geom::Affine a = pat->get_transform();
a[4] = 0;
a[5] = 0;
delta = delta * a;