Graphics::PolylineObject Class Reference

A sequence of lines. More...

#include <Object.h>

Inheritance diagram for Graphics::PolylineObject:
Collaboration diagram for Graphics::PolylineObject:

Public Member Functions

 PolylineObject (Pen pen, size_t count)
 
template<typename... ParamTypes>
 PolylineObject (Pen pen, ParamTypes... params)
 
 PolylineObject (const RectObject &object)
 
 PolylineObject (Pen pen, const Rect &rect, uint8_t radius)
 
Point operator[] (unsigned index) const
 
void write (MetaWriter &meta) const override
 
RenderercreateRenderer (const Location &location) const override
 Create a software renderer for this object. More...
 
- Public Member Functions inherited from Graphics::ObjectTemplate< Object::Kind::Polyline >
Kind kind () const override
 
- Public Member Functions inherited from Graphics::Object
bool operator== (const Object &other) const
 
virtual String getTypeStr () const
 
- Public Member Functions inherited from LinkedObjectTemplate< Object >
Object * getNext () const
 
bool insertAfter (Object *object)
 
Iterator begin () const
 
Iterator end () const
 
Iterator cbegin () const
 
Iterator cend () const
 
- Public Member Functions inherited from LinkedObject
virtual ~LinkedObject ()
 
virtual LinkedObjectnext () const
 
bool insertAfter (LinkedObject *object)
 
bool operator== (const LinkedObject &other) const
 
bool operator!= (const LinkedObject &other) const
 

Public Attributes

Pen pen
 
std::unique_ptr< Point[]> points
 
uint16_t numPoints
 
bool connected {true}
 

Additional Inherited Members

- Public Types inherited from Graphics::Object
enum class  Kind { XX }
 
using List = LinkedObjectListTemplate< Object >
 
using OwnedList = OwnedLinkedObjectListTemplate< Object >
 
- Public Types inherited from LinkedObjectTemplate< Object >
using Iterator = IteratorTemplate< Object, Object *, Object & >
 
using ConstIterator = IteratorTemplate< const Object, const Object *, const Object & >
 

Detailed Description

A sequence of lines.

By default, lines are connected. This is used to draw rectangles, triangles or any other type of polygon. A line is drawn between points 0-1, 1-2, 2-3, etc.

Setting the connected property to false allows the lines to be discontinuous, so a line is drawn between points 0-1, 2-3, 3-4, etc.

Constructor & Destructor Documentation

◆ PolylineObject() [1/4]

Graphics::PolylineObject::PolylineObject ( Pen  pen,
size_t  count 
)
inline

◆ PolylineObject() [2/4]

template<typename... ParamTypes>
Graphics::PolylineObject::PolylineObject ( Pen  pen,
ParamTypes...  params 
)
inline

◆ PolylineObject() [3/4]

Graphics::PolylineObject::PolylineObject ( const RectObject object)
inline

◆ PolylineObject() [4/4]

Graphics::PolylineObject::PolylineObject ( Pen  pen,
const Rect rect,
uint8_t  radius 
)
inline

Member Function Documentation

◆ createRenderer()

Renderer* Graphics::PolylineObject::createRenderer ( const Location location) const
overridevirtual

Create a software renderer for this object.

Parameters
location
Return values
rendererReturned renderer object

Return nullptr if object cannot/should not be rendered

Implements Graphics::Object.

◆ operator[]()

Point Graphics::PolylineObject::operator[] ( unsigned  index) const
inline

◆ write()

void Graphics::PolylineObject::write ( MetaWriter meta) const
inlineoverridevirtual

Implements Graphics::Object.

Member Data Documentation

◆ connected

bool Graphics::PolylineObject::connected {true}

◆ numPoints

uint16_t Graphics::PolylineObject::numPoints

◆ pen

Pen Graphics::PolylineObject::pen

◆ points

std::unique_ptr<Point[]> Graphics::PolylineObject::points

The documentation for this class was generated from the following file: