First opengl/x11/window integration.
This commit is contained in:
parent
7c6a92f4ec
commit
cea3d2c39f
30 changed files with 254 additions and 72 deletions
|
@ -6,9 +6,16 @@ Point::Point(double x, double y)
|
|||
{
|
||||
}
|
||||
|
||||
Point::Point(const DiscretePoint& point)
|
||||
: mX(point.GetX()),
|
||||
mY(point.GetY())
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
Point::Point(const Point& reference, double offSetX, double offSetY)
|
||||
: mX(reference.getX() + offSetX),
|
||||
mY(reference.getX() + offSetY)
|
||||
mY(reference.getY() + offSetY)
|
||||
{
|
||||
|
||||
}
|
||||
|
|
|
@ -1,5 +1,7 @@
|
|||
#pragma once
|
||||
|
||||
#include "DiscretePoint.h"
|
||||
|
||||
#include <memory>
|
||||
#include <cmath>
|
||||
|
||||
|
@ -9,6 +11,8 @@ public:
|
|||
|
||||
Point(double x, double y);
|
||||
|
||||
Point(const DiscretePoint& point);
|
||||
|
||||
Point(const Point& reference, double offSetX, double offSetY);
|
||||
|
||||
~Point();
|
||||
|
|
|
@ -7,6 +7,14 @@ Rectangle::Rectangle(const Point& bottomLeft, const Point& topRight)
|
|||
mWidth = mBottomLeft.getDeltaX(topRight);
|
||||
}
|
||||
|
||||
Rectangle::Rectangle(const Point& bottomLeft, double width, double height)
|
||||
: mBottomLeft(bottomLeft),
|
||||
mHeight(height),
|
||||
mWidth(width)
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
Rectangle Rectangle::getBounds() const
|
||||
{
|
||||
return Rectangle(mBottomLeft, Point(mBottomLeft, mWidth, mHeight));
|
||||
|
|
|
@ -11,6 +11,7 @@ class Rectangle : public AbstractGeometricItem
|
|||
public:
|
||||
|
||||
Rectangle(const Point& bottomLeft, const Point& topRight);
|
||||
Rectangle(const Point& bottomLeft, double width, double height);
|
||||
|
||||
double getHeight() const;
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue