summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorJabier Arraiza Cenoz <jabier.arraiza@marker.es>2014-11-01 21:58:19 +0000
committerJabiertxof <jtx@jtx.marker.es>2014-11-01 21:58:19 +0000
commitd4056752d41865bf7b6890b14cbd00ae0fa1478f (patch)
tree825ad53559ebb46f670951532c56161842dcb29a /src
parentrestore file accidentally removed. (diff)
downloadinkscape-d4056752d41865bf7b6890b14cbd00ae0fa1478f.tar.gz
inkscape-d4056752d41865bf7b6890b14cbd00ae0fa1478f.zip
Fix a bug in perspective/envelope LPE, rendering points -handles- outside bounding box
It affect to Envelope mode, sometimes give undesirable results, now fixed. (bzr r13655)
Diffstat (limited to 'src')
-rw-r--r--src/live_effects/lpe-perspective-envelope.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/live_effects/lpe-perspective-envelope.cpp b/src/live_effects/lpe-perspective-envelope.cpp
index 4d8c79198..0e620bc99 100644
--- a/src/live_effects/lpe-perspective-envelope.cpp
+++ b/src/live_effects/lpe-perspective-envelope.cpp
@@ -193,8 +193,8 @@ LPEPerspectiveEnvelope::project_point(Geom::Point p){
double height = boundingbox_Y.extent();
double delta_x = boundingbox_X.min() - p[X];
double delta_y = boundingbox_Y.max() - p[Y];
- Geom::Coord xratio = (delta_x * sgn(delta_x)) / width;
- Geom::Coord yratio = (delta_y * sgn(delta_y)) / height;
+ Geom::Coord xratio = (delta_x * -1) / width;
+ Geom::Coord yratio = delta_y / height;
Geom::Line* horiz = new Geom::Line();
Geom::Line* vert = new Geom::Line();
vert->setPoints (pointAtRatio(yratio,Down_Left_Point,Up_Left_Point),pointAtRatio(yratio,Down_Right_Point,Up_Right_Point));