corrected wrong constructors in src/util/Rectangle

presentation
Fabian Keßler 7 years ago
parent 12e2b37f5a
commit 45f945c545
  1. 14
      src/util/Rectangle.cpp
  2. 2
      src/util/Rectangle.h

@ -8,23 +8,15 @@ Rectangle::Rectangle()
}
Rectangle::Rectangle(double x, double y, double width, double height)
: x(x), y(y), width(width), height(height)
{
XOJ_INIT_TYPE(Rectangle);
this->x = x;
this->y = y;
this->width = width;
this->height = height;
}
Rectangle::Rectangle(Range& rect)
Rectangle::Rectangle(const Range& rect)
: x(rect.getX()), y(rect.getY()), width(rect.getWidth()), height(rect.getHeight())
{
XOJ_INIT_TYPE(Rectangle);
this->x = rect.getX();
this->y = rect.getY();
this->width = rect.getWidth();
this->height = rect.getHeight();
}
Rectangle::~Rectangle()

@ -19,7 +19,7 @@ class Rectangle
{
public:
Rectangle();
Rectangle(Range& rect);
explicit Rectangle(const Range& rect);
Rectangle(double x, double y, double width, double height);
virtual ~Rectangle();

Loading…
Cancel
Save