Geometrize 1.0
C++ library for geometrizing images into geometric primitives
ellipse.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 Ellipse : public Shape
16{
17public:
18 Ellipse() = default;
19 Ellipse(float x, float y, float rx, float ry);
20
21 virtual std::shared_ptr<geometrize::Shape> clone() const override;
22 virtual geometrize::ShapeTypes getType() const override;
23
24 float m_x;
25 float m_y;
26 float m_rx;
27 float m_ry;
28};
29
30}
The Ellipse class represents an ellipse.
Definition: ellipse.h:16
virtual geometrize::ShapeTypes getType() const override
getType Gets the ShapeType of the shape.
Definition: ellipse.cpp:32
float m_rx
x-radius.
Definition: ellipse.h:26
float m_y
y-coordinate.
Definition: ellipse.h:25
float m_ry
y-radius.
Definition: ellipse.h:27
float m_x
x-coordinate.
Definition: ellipse.h:24
virtual std::shared_ptr< geometrize::Shape > clone() const override
clone Clones the shape, a virtual copy constructor.
Definition: ellipse.cpp:19
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