diff options
Diffstat (limited to 'src/live_effects/lpe-perspective-envelope.cpp')
| -rw-r--r-- | src/live_effects/lpe-perspective-envelope.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/live_effects/lpe-perspective-envelope.cpp b/src/live_effects/lpe-perspective-envelope.cpp index 4d8c79198..b5ef26e2f 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)); @@ -337,7 +337,7 @@ LPEPerspectiveEnvelope::resetGrid() Down_Left_Point.param_set_and_write_default(); //todo:this hack is only to reposition the knots on reser grid button //Better update path effect in LPEITEM - SPDesktop * desktop = inkscape_active_desktop(); + SPDesktop * desktop = SP_ACTIVE_DESKTOP; tools_switch(desktop, TOOLS_SELECT); tools_switch(desktop, TOOLS_NODES); } |
