Draws an ellipse outline. More...

#include <Renderer.h>

Inheritance diagram for Graphics::EllipseRenderer:
Collaboration diagram for Graphics::EllipseRenderer:

Public Member Functions

 EllipseRenderer (const Location &location, const Pen &pen, const Rect &rect)
 
 EllipseRenderer (const Location &location, const EllipseObject &object)
 
 EllipseRenderer (const Location &location, const CircleObject &object)
 
bool execute (Surface &surface) override
 Called to do some writing to the surface. More...
 
- Public Member Functions inherited from Graphics::Renderer
 Renderer (const Location &location)
 Constructor. More...
 
virtual ~Renderer ()
 
- Public Member Functions inherited from LinkedObjectTemplate< Renderer >
Renderer * getNext () const
 
bool insertAfter (Renderer *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
 

Protected Types

enum class  State {
  init , running , final1 , final2 ,
  done
}
 

Protected Member Functions

virtual void addRectangles1 ()
 
virtual void addRectangles2 ()
 
virtual void final ()
 

Protected Attributes

const Rect r
 
Rect r1
 
Rect r2
 
ArcRectList rectangles
 
const uint16_t w
 
uint16_t W
 
State state {}
 
- Protected Attributes inherited from Graphics::Renderer
Location location
 

Additional Inherited Members

- Public Types inherited from Graphics::Renderer
using List = LinkedObjectListTemplate< Renderer >
 
using OwnedList = OwnedLinkedObjectListTemplate< Renderer >
 
- Public Types inherited from LinkedObjectTemplate< Renderer >
using Iterator = IteratorTemplate< Renderer, Renderer *, Renderer & >
 
using ConstIterator = IteratorTemplate< const Renderer, const Renderer *, const Renderer & >
 

Detailed Description

Draws an ellipse outline.

Uses McIlroy's Ellipse Algorithm

See http://enchantia.com/graphapp/doc/tech/ellipses.html

Member Enumeration Documentation

◆ State

enum Graphics::EllipseRenderer::State
strongprotected
Enumerator
init 
running 
final1 
final2 
done 

Constructor & Destructor Documentation

◆ EllipseRenderer() [1/3]

Graphics::EllipseRenderer::EllipseRenderer ( const Location location,
const Pen pen,
const Rect rect 
)
inline

◆ EllipseRenderer() [2/3]

Graphics::EllipseRenderer::EllipseRenderer ( const Location location,
const EllipseObject object 
)
inline

◆ EllipseRenderer() [3/3]

Graphics::EllipseRenderer::EllipseRenderer ( const Location location,
const CircleObject object 
)
inline

Member Function Documentation

◆ addRectangles1()

virtual void Graphics::EllipseRenderer::addRectangles1 ( )
protectedvirtual

Reimplemented in Graphics::ArcRenderer.

◆ addRectangles2()

virtual void Graphics::EllipseRenderer::addRectangles2 ( )
protectedvirtual

Reimplemented in Graphics::ArcRenderer.

◆ execute()

bool Graphics::EllipseRenderer::execute ( Surface surface)
overridevirtual

Called to do some writing to the surface.

Return values
booltrue when rendering is complete, false if more work to be done

Implements Graphics::Renderer.

Reimplemented in Graphics::ArcRenderer.

◆ final()

virtual void Graphics::EllipseRenderer::final ( )
protectedvirtual

Reimplemented in Graphics::ArcRenderer.

Member Data Documentation

◆ r

const Rect Graphics::EllipseRenderer::r
protected

◆ r1

Rect Graphics::EllipseRenderer::r1
protected

◆ r2

Rect Graphics::EllipseRenderer::r2
protected

◆ rectangles

ArcRectList Graphics::EllipseRenderer::rectangles
protected

◆ state

State Graphics::EllipseRenderer::state {}
protected

◆ w

const uint16_t Graphics::EllipseRenderer::w
protected

◆ W

uint16_t Graphics::EllipseRenderer::W
protected

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