Geometrize 1.0
C++ library for geometrizing images into geometric primitives
rotatedrectangle.h
Go to the documentation of this file.
1#pragma once
2
3#include <cstdint>
4#include <memory>
5
6#include "shape.h"
7
8namespace geometrize
9{
10
15class RotatedRectangle : public Shape
16{
17public:
18 RotatedRectangle() = default;
19 RotatedRectangle(float x1, float y1, float x2, float y2, float angle);
20
21 virtual std::shared_ptr<geometrize::Shape> clone() const override;
22 virtual geometrize::ShapeTypes getType() const override;
23
24 float m_x1;
25 float m_y1;
26 float m_x2;
27 float m_y2;
28 float m_angle;
29};
30
31}
The RotatedRectangle class represents a rotated rectangle.
Definition: rotatedrectangle.h:16
float m_y1
Top coordinate.
Definition: rotatedrectangle.h:25
float m_y2
Bottom coordinate.
Definition: rotatedrectangle.h:27
float m_x1
Left coordinate.
Definition: rotatedrectangle.h:24
virtual geometrize::ShapeTypes getType() const override
getType Gets the ShapeType of the shape.
Definition: rotatedrectangle.cpp:34
virtual std::shared_ptr< geometrize::Shape > clone() const override
clone Clones the shape, a virtual copy constructor.
Definition: rotatedrectangle.cpp:20
float m_x2
Right coordinate.
Definition: rotatedrectangle.h:26
float m_angle
Rotation angle.
Definition: rotatedrectangle.h:28
Definition: shape.h:18
Definition: bitmap.cpp:8
ShapeTypes
The ShapeTypes enum specifies the types of shapes that can be used. These can be combined to produce ...
Definition: shapetypes.h:17