#include </home/evins/glbarcode/glbarcode/Renderer.hpp>
|
| | 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 |
| |
Base class for all renderers.
◆ Renderer() [1/2]
| glbarcode::Renderer::Renderer |
( |
| ) |
|
|
protecteddefault |
◆ ~Renderer()
| virtual glbarcode::Renderer::~Renderer |
( |
| ) |
|
|
virtualdefault |
◆ Renderer() [2/2]
| glbarcode::Renderer::Renderer |
( |
const Renderer & |
| ) |
|
|
delete |
◆ 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] | w | Width of barcode bounding box (points) |
| [in] | h | Height 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.
- Parameters
-
| [in] | x | X coordinate of box's origin (points) |
| [in] | y | Y coordinate of box's origin (points) |
| [in] | w | Width of box (points) |
| [in] | h | Height 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] | x | X coordinate of hexagon's origin (points) |
| [in] | y | Y coordinate of hexagon's origin (points) |
| [in] | h | Height 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] | x | X coordinate of line's origin (points) |
| [in] | y | Y coordinate of line's origin (points) |
| [in] | w | Line width (points) |
| [in] | h | Line 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] | x | X coordinate of ring's origin (points) |
| [in] | y | Y coordinate of ring's origin (points) |
| [in] | r | Radius of ring (points) |
| [in] | w | Line 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] | x | X coordinate of text's origin (points) |
| [in] | y | Y coordinate of text's origin (points) |
| [in] | size | Font size of text (points) |
| [in] | text | Text |
◆ 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] | w | Width of barcode bounding box (points) |
| [in] | h | Height of barcode bounding box (points) |
| [in] | primitives | List of drawing primitives |
The documentation for this class was generated from the following file: