summaryrefslogtreecommitdiffstats
path: root/src/ui/tool/path-manipulator.cpp
diff options
context:
space:
mode:
authorJabier Arraiza Cenoz <jabier.arraiza@marker.es>2014-05-05 08:44:33 +0000
committerJabiertxof <jtx@jtx.marker.es>2014-05-05 08:44:33 +0000
commit8a4e7975e48ae18a719f4ecfae795fb44a188eee (patch)
treec2262728d2bdf1825521dc4cbe71a8b2f3bf8b63 /src/ui/tool/path-manipulator.cpp
parentupdate to trunk (diff)
parentEnabling path manipulator to comunicate if paths are bspline when (diff)
downloadinkscape-8a4e7975e48ae18a719f4ecfae795fb44a188eee.tar.gz
inkscape-8a4e7975e48ae18a719f4ecfae795fb44a188eee.zip
adding Vinícius work whith node tips
(bzr r11950.1.339)
Diffstat (limited to 'src/ui/tool/path-manipulator.cpp')
-rw-r--r--src/ui/tool/path-manipulator.cpp12
1 files changed, 8 insertions, 4 deletions
diff --git a/src/ui/tool/path-manipulator.cpp b/src/ui/tool/path-manipulator.cpp
index 487c31b10..3beeed049 100644
--- a/src/ui/tool/path-manipulator.cpp
+++ b/src/ui/tool/path-manipulator.cpp
@@ -1181,14 +1181,14 @@ void PathManipulator::_createControlPointsFromGeometry()
}
//determines if the trace has a bspline effect and the number of steps that it takes
-int PathManipulator::BSplineGetSteps(){
+int PathManipulator::BSplineGetSteps() const {
- LivePathEffect::LPEBSpline *lpe_bsp = NULL;
+ LivePathEffect::LPEBSpline const *lpe_bsp = NULL;
if (SP_IS_LPE_ITEM(_path) && _path->hasPathEffect()){
- Inkscape::LivePathEffect::Effect* thisEffect = SP_LPE_ITEM(_path)->getPathEffectOfType(Inkscape::LivePathEffect::BSPLINE);
+ Inkscape::LivePathEffect::Effect const *thisEffect = SP_LPE_ITEM(_path)->getPathEffectOfType(Inkscape::LivePathEffect::BSPLINE);
if(thisEffect){
- lpe_bsp = dynamic_cast<LivePathEffect::LPEBSpline*>(thisEffect->getLPEObj()->get_lpe());
+ lpe_bsp = dynamic_cast<LivePathEffect::LPEBSpline const*>(thisEffect->getLPEObj()->get_lpe());
}
}
int steps = 0;
@@ -1206,6 +1206,10 @@ bool PathManipulator::isBSpline(bool recalculate){
return _is_bspline;
}
+bool PathManipulator::isBSpline() const {
+ return BSplineGetSteps() > 0;
+}
+
// returns the corresponding strength to the position of the handlers
double PathManipulator::BSplineHandlePosition(Handle *h, Handle *h2){
using Geom::X;