summaryrefslogtreecommitdiffstats
path: root/Rectangle.h
diff options
context:
space:
mode:
authorneoraider <devnull@localhost>2007-09-21 23:47:05 +0200
committerneoraider <devnull@localhost>2007-09-21 23:47:05 +0200
commit62e42408485e9e1b7e939925b650a4b2e90ecddb (patch)
tree9305aa0f7b2d79c35250939beca2c268dd61e23d /Rectangle.h
parent1bce1d8ad7c32ce7b6723a284842b6890cf5209f (diff)
downloadzoomedit-62e42408485e9e1b7e939925b650a4b2e90ecddb.tar
zoomedit-62e42408485e9e1b7e939925b650a4b2e90ecddb.zip
zoomedit: Big transition Ciaro -> OpenGL, enormous speedup!
Diffstat (limited to 'Rectangle.h')
-rw-r--r--Rectangle.h10
1 files changed, 3 insertions, 7 deletions
diff --git a/Rectangle.h b/Rectangle.h
index 8a61321..5e7bb94 100644
--- a/Rectangle.h
+++ b/Rectangle.h
@@ -18,13 +18,9 @@ class Rectangle {
Vertex v1, v2;
public:
Rectangle() {}
- Rectangle(const Vertex& v1, const Vertex& v2) {
- this->v1 = v1; this->v2 = v2;
- }
- Rectangle(double x, double y, double width, double height) {
- v1.setLocation(x, y);
- v2.setLocation(x+width, y+height);
- }
+ Rectangle(const Vertex& vertex1, const Vertex& vertex2) : v1(vertex1), v2(vertex2) {}
+ Rectangle(double x, double y, double width, double height)
+ : v1(x, y), v2(x+width, y+height) {}
Vertex &getVertex1() {return v1;}
const Vertex &getVertex1() const {return v1;}