summaryrefslogtreecommitdiffstats
path: root/src/vanishing-point.cpp
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.cpp
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.cpp')
-rw-r--r--src/vanishing-point.cpp9
1 files changed, 9 insertions, 0 deletions
diff --git a/src/vanishing-point.cpp b/src/vanishing-point.cpp
index 20c67cb28..5f40936cf 100644
--- a/src/vanishing-point.cpp
+++ b/src/vanishing-point.cpp
@@ -45,6 +45,15 @@ VanishingPoint::VanishingPoint(VanishingPoint const &rhs) : NR::Point (rhs)
this->v_dir = rhs.v_dir;
}
+bool VanishingPoint::operator== (VanishingPoint const &other)
+{
+ // Should we compare the parent perspectives, too? Probably not.
+ if ((*this)[NR::X] == other[NR::X] && (*this)[NR::Y] == other[NR::Y]
+ && this->state == other.state && this->v_dir == other.v_dir) {
+ return true;
+ }
+ return false;
+}
bool VanishingPoint::is_finite() const
{