summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: e44b9de)
raw | patch | inline | side by side (parent: e44b9de)
author | cilix42 <cilix42@users.sourceforge.net> | |
Fri, 1 Aug 2008 17:42:13 +0000 (17:42 +0000) | ||
committer | cilix42 <cilix42@users.sourceforge.net> | |
Fri, 1 Aug 2008 17:42:13 +0000 (17:42 +0000) |
src/live_effects/lpe-copy_rotate.cpp | patch | blob | history | |
src/live_effects/lpe-copy_rotate.h | patch | blob | history |
index 79312ad9b7e49a8db5db0a24290190336c800255..5fd33605b60fce105f604a15fd95ea614d408b43 100644 (file)
{
using namespace Geom;
+ // I first suspected the minus sign to be a bug in 2geom but it is
+ // likely due to SVG's choice of coordinate system orientation (max)
+ start_pos = origin + dir * Rotate(-deg_to_rad(starting_angle)) * dist_angle_handle;
+ rot_pos = origin + dir * Rotate(-deg_to_rad(starting_angle + rotation_angle)) * dist_angle_handle;
+
A = pwd2_in.firstValue();
B = pwd2_in.lastValue();
dir = unit_vector(B - A);
@@ -113,9 +118,6 @@ LPECopyRotate::addCanvasIndicators(SPLPEItem *lpeitem, std::vector<Geom::PathVec
{
using namespace Geom;
- Point start_pos = origin + dir * Rotate(-deg_to_rad(starting_angle)) * dist_angle_handle;
- Point rot_pos = origin + dir * Rotate(-deg_to_rad(starting_angle + rotation_angle)) * dist_angle_handle;
-
Path path(start_pos);
path.appendNew<LineSegment>((Geom::Point) origin);
path.appendNew<LineSegment>(rot_pos);
KnotHolderEntityStartingAngle::knot_get()
{
LPECopyRotate* lpe = get_effect(item);
- // I first suspected the minus sign to be a bug in 2geom but it is
- // likely due to SVG's choice of coordinate system orientation (max)
- Point d = lpe->dir * Rotate(-deg_to_rad(lpe->starting_angle)) * lpe->dist_angle_handle;
-
- return snap_knot_position(lpe->origin + d);
+ return snap_knot_position(lpe->start_pos);
}
NR::Point
KnotHolderEntityRotationAngle::knot_get()
{
LPECopyRotate* lpe = get_effect(item);
- // I first suspected the minus sign to be a bug in 2geom but it is
- // likely due to SVG's choice of coordinate system orientation (max)
- Point d = lpe->dir * Rotate(-deg_to_rad(lpe->starting_angle + lpe->rotation_angle)) * lpe->dist_angle_handle;
-
- return snap_knot_position(lpe->origin + d);
+ return snap_knot_position(lpe->rot_pos);
}
} // namespace CR
index 7cf9bdef7b05cce45f07489eea8f516522573897..8cabdfb4885ba04eea3dfab46fb0da0c65237d5b 100644 (file)
Geom::Point A;
Geom::Point B;
Geom::Point dir;
+
+ Geom::Point start_pos;
+ Geom::Point rot_pos;
double dist_angle_handle;
LPECopyRotate(const LPECopyRotate&);