Geometrize 1.0
C++ library for geometrizing images into geometric primitives
polyline.h
Go to the documentation of this file.
1#pragma once
2
3#include <cstdint>
4#include <memory>
5#include <utility>
6#include <vector>
7
8#include "shape.h"
9
10namespace geometrize
11{
12
17class Polyline : public Shape
18{
19public:
20 Polyline() = default;
21 Polyline(const std::vector<std::pair<float, float>>& points);
22
23 virtual std::shared_ptr<geometrize::Shape> clone() const override;
24 virtual geometrize::ShapeTypes getType() const override;
25
26 std::vector<std::pair<float, float>> m_points;
27};
28
29}
The Polyline class represents a polyline.
Definition: polyline.h:18
virtual geometrize::ShapeTypes getType() const override
getType Gets the ShapeType of the shape.
Definition: polyline.cpp:28
std::vector< std::pair< float, float > > m_points
The points on the polyline.
Definition: polyline.h:26
virtual std::shared_ptr< geometrize::Shape > clone() const override
clone Clones the shape, a virtual copy constructor.
Definition: polyline.cpp:18
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