summaryrefslogtreecommitdiffstats
path: root/src/vanishing-point.h
diff options
context:
space:
mode:
authorMaximilian Albert <maximilian.albert@gmail.com>2007-08-06 06:51:01 +0000
committercilix42 <cilix42@users.sourceforge.net>2007-08-06 06:51:01 +0000
commit090f7cc9a4990377510d794b7a9556d4ce4cec64 (patch)
treeb86779c1a0ad075e0e4bfad19e53c36c9dca7390 /src/vanishing-point.h
parentPreparatory stuff to combine VPs in draggers (diff)
downloadinkscape-090f7cc9a4990377510d794b7a9556d4ce4cec64.tar.gz
inkscape-090f7cc9a4990377510d794b7a9556d4ce4cec64.zip
Write/read perspectives to/from SVG; store ratios of the distances from corners to VPs (preparation for dragging)
(bzr r3388)
Diffstat (limited to 'src/vanishing-point.h')
-rw-r--r--src/vanishing-point.h8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/vanishing-point.h b/src/vanishing-point.h
index 85b7434e2..918b27fc7 100644
--- a/src/vanishing-point.h
+++ b/src/vanishing-point.h
@@ -47,6 +47,14 @@ public:
VanishingPoint(NR::Coord x, NR::Coord y, NR::Coord dir_x, NR::Coord dir_y);
VanishingPoint(VanishingPoint const &rhs);
+ bool operator== (VanishingPoint const &other);
+
+ inline NR::Point get_pos() const { return NR::Point ((*this)[NR::X], (*this)[NR::Y]); }
+ inline void set_pos(NR::Point const &pt) { (*this)[NR::X] = pt[NR::X];
+ (*this)[NR::Y] = pt[NR::Y]; }
+ inline void set_pos(const double pt_x, const double pt_y) { (*this)[NR::X] = pt_x;
+ (*this)[NR::Y] = pt_y; }
+
bool is_finite() const;
VPState toggle_parallel();
void draw(Box3D::Axis const axis); // Draws a point on the canvas if state == VP_FINITE