glbarcode++
 
Loading...
Searching...
No Matches
glbarcode::Renderer Class Referenceabstract

#include </home/evins/glbarcode/glbarcode/Renderer.hpp>

Inheritance diagram for glbarcode::Renderer:
Collaboration diagram for glbarcode::Renderer:

Public Member Functions

virtual ~Renderer ()=default
 
 Renderer (const Renderer &)=delete
 
void operator= (const Renderer &)=delete
 
void render (double w, double h, const std::list< DrawingPrimitive * > &primitives)
 

Protected Member Functions

 Renderer ()=default
 
virtual void drawBegin (double w, double h)=0
 
virtual void drawEnd ()=0
 
virtual void drawLine (double x, double y, double w, double h)=0
 
virtual void drawBox (double x, double y, double w, double h)=0
 
virtual void drawText (double x, double y, double size, const std::string &text, HAlign halign=H_ALIGN_CENTER)=0
 
virtual void drawRing (double x, double y, double r, double w)=0
 
virtual void drawHexagon (double x, double y, double h)=0
 

Detailed Description

Base class for all renderers.

Constructor & Destructor Documentation

◆ Renderer() [1/2]

glbarcode::Renderer::Renderer ( )
protecteddefault

Default constructor.

◆ ~Renderer()

virtual glbarcode::Renderer::~Renderer ( )
virtualdefault

Destructor.

◆ Renderer() [2/2]

glbarcode::Renderer::Renderer ( const Renderer )
delete

Member Function Documentation

◆ drawBegin()

virtual void glbarcode::Renderer::drawBegin ( double  w,
double  h 
)
protectedpure virtual

Draw begin.

Required virtual method to perform rendering setup, such as opening devices and/or initializing drawing contexts.

Parameters
[in]wWidth of barcode bounding box (points)
[in]hHeight of barcode bounding box (points)

◆ drawBox()

virtual void glbarcode::Renderer::drawBox ( double  x,
double  y,
double  w,
double  h 
)
protectedpure virtual

Draw box primitive.

Required virtual method to draw or render box drawing primitive.

Box primitive properties
Parameters
[in]xX coordinate of box's origin (points)
[in]yY coordinate of box's origin (points)
[in]wWidth of box (points)
[in]hHeight of box (points)

◆ drawEnd()

virtual void glbarcode::Renderer::drawEnd ( )
protectedpure virtual

Draw end.

Required virtual method to perform rendering cleanup, such as closing devices and/or drawing contexts.

◆ drawHexagon()

virtual void glbarcode::Renderer::drawHexagon ( double  x,
double  y,
double  h 
)
protectedpure virtual

Draw hexagon primitive.

Required virtual method to draw or render hexagon drawing primitive.

Hexagon primitive properties
Parameters
[in]xX coordinate of hexagon's origin (points)
[in]yY coordinate of hexagon's origin (points)
[in]hHeight of hexagon (points)

◆ drawLine()

virtual void glbarcode::Renderer::drawLine ( double  x,
double  y,
double  w,
double  h 
)
protectedpure virtual

Draw line primitive.

Required virtual method to draw or render line drawing primitive.

Line primitive properties
Parameters
[in]xX coordinate of line's origin (points)
[in]yY coordinate of line's origin (points)
[in]wLine width (points)
[in]hLine height (points)

◆ drawRing()

virtual void glbarcode::Renderer::drawRing ( double  x,
double  y,
double  r,
double  w 
)
protectedpure virtual

Draw ring primitive.

Required virtual method to draw or render ring drawing primitive.

Ring primitive properties
Parameters
[in]xX coordinate of ring's origin (points)
[in]yY coordinate of ring's origin (points)
[in]rRadius of ring (points)
[in]wLine width of ring (points)

◆ drawText()

virtual void glbarcode::Renderer::drawText ( double  x,
double  y,
double  size,
const std::string &  text,
HAlign  halign = H_ALIGN_CENTER 
)
protectedpure virtual

Draw text primitive.

Required virtual method to draw or render text drawing primitive.

Text primitive properties
Parameters
[in]xX coordinate of text's origin (points)
[in]yY coordinate of text's origin (points)
[in]sizeFont size of text (points)
[in]textText

◆ operator=()

void glbarcode::Renderer::operator= ( const Renderer )
delete

◆ render()

void glbarcode::Renderer::render ( double  w,
double  h,
const std::list< DrawingPrimitive * > &  primitives 
)

Render list of primitives.

Parameters
[in]wWidth of barcode bounding box (points)
[in]hHeight of barcode bounding box (points)
[in]primitivesList of drawing primitives

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