#include </home/evins/glbarcode/glbarcode/Barcode.hpp >
Barcode ()
void clear ()
void addLine (double x, double y, double w, double h)
void addBox (double x, double y, double w, double h)
void addText (double x, double y, double size, const std::string &text, HAlign halign=H_ALIGN_CENTER )
void addRing (double x, double y, double r, double w)
void addHexagon (double x, double y, double h)
void setIsEmpty (bool value)
void setIsDataValid (bool value)
void setWidth (double w)
void setHeight (double h)
The Barcode class is the base class for all barcode implementations. This class provides the public interfaces and basic infrastructure for all barcode implementations. Implementations would not typically directly implement this class, but instead would implement either Barcode1dBase (for 1D symbologies) or Barcode2dBase (for 2D symbologies).
See Barcode1dBase or Barcode2dBase .
◆ Barcode() [1/2]
glbarcode::Barcode::Barcode
(
)
protected
◆ ~Barcode()
virtual glbarcode::Barcode::~Barcode
(
)
virtual
◆ Barcode() [2/2]
glbarcode::Barcode::Barcode
(
const Barcode &
)
delete
◆ addBox()
void glbarcode::Barcode::addBox
(
double
x ,
double
y ,
double
w ,
double
h
)
protected
Add box drawing primitive
To be used by build() implementations during vectorization.
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)
◆ addHexagon()
void glbarcode::Barcode::addHexagon
(
double
x ,
double
y ,
double
h
)
protected
Add hexagon drawing primitive
To be used by build() implementations during vectorization.
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)
◆ addLine()
void glbarcode::Barcode::addLine
(
double
x ,
double
y ,
double
w ,
double
h
)
protected
Add line drawing primitive
To be used by build() implementations during vectorization.
Line primitive properties
Parameters
[in] x X coordinate of line's origin (points)
[in] y Y coordinate of line's origin (points)
[in] w Bar width (points)
[in] h Bar height (points)
◆ addRing()
void glbarcode::Barcode::addRing
(
double
x ,
double
y ,
double
r ,
double
w
)
protected
Add ring drawing primitive
To be used by build() implementations during vectorization.
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)
◆ addText()
void glbarcode::Barcode::addText
(
double
x ,
double
y ,
double
size ,
const std::string &
text ,
HAlign
halign = H_ALIGN_CENTER
)
protected
Add text drawing primitive
To be used by build() implementations during vectorization.
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
[in] halign Horizontal text alignment
◆ build()
virtual Barcode & glbarcode::Barcode::build
(
const std::string &
data ,
double
w = 0,
double
h = 0
)
pure virtual
Build barcode from data.
Parameters
[in] data Data to encode in barcode
[in] w Requested width of barcode (0 = auto size)
[in] h Requested height of barcode (0 = auto size)
Returns A reference to this Barcode object for chaining methods
Implemented in glbarcode::Barcode1dBase , and glbarcode::Barcode2dBase .
◆ checksum()
bool glbarcode::Barcode::checksum
(
)
const
Get accessor for "checksum" property.
Returns Value of boolean "checksum" property
See also setChecksum()
◆ clear()
void glbarcode::Barcode::clear
(
)
protected
Clear drawing primitives.
◆ height()
double glbarcode::Barcode::height
(
)
const
Get actual height of barcode (may differ from requested height).
Returns Actual height of barcode (points)
See also setHeight()
◆ isDataValid()
bool glbarcode::Barcode::isDataValid
(
)
const
Is barcode data valid?
Returns True if barcode data is valid
False if barcode data is not valid for implemented barcode type
See also setIsDataValid()
◆ isEmpty()
bool glbarcode::Barcode::isEmpty
(
)
const
Is barcode data empty?
Returns True if barcode data is empty
False if barcode data is not empty
See also setIsEmpty()
◆ operator=()
void glbarcode::Barcode::operator=
(
const Barcode &
)
delete
◆ render()
void glbarcode::Barcode::render
(
Renderer &
renderer )
Render barcode using given Renderer object.
Parameters
◆ setChecksum()
Barcode & glbarcode::Barcode::setChecksum
(
bool
value )
Set accessor for "checksum" property.
Parameters
Returns A reference to this Barcode object for property chaining
See also checksum()
◆ setHeight()
void glbarcode::Barcode::setHeight
(
double
h )
protected
Set new height of barcode.
To be used by build() implementations to override requested height of barcode.
Parameters
[in] h Actual height of barcode (points)
See also height()
◆ setIsDataValid()
void glbarcode::Barcode::setIsDataValid
(
bool
value )
protected
Set is data valid property.
To be used by build() implementations to indicate if input data is valid or not.
Parameters
[in] value Boolean value of flag
See also isDataValid()
◆ setIsEmpty()
void glbarcode::Barcode::setIsEmpty
(
bool
value )
protected
Set is empty property.
To be used by build() implementations to indicate if input data is empty.
Parameters
[in] value Boolean value of flag
See also isEmpty()
◆ setShowText()
Barcode & glbarcode::Barcode::setShowText
(
bool
value )
Set accessor for "showText" property.
Parameters
Returns A reference to this Barcode object for property chaining
See also showText()
◆ setWidth()
void glbarcode::Barcode::setWidth
(
double
w )
protected
Set new width of barcode.
To be used by build() implementations to override requested width of barcode.
Parameters
[in] w Actual width of barcode (points)
See also width()
◆ showText()
bool glbarcode::Barcode::showText
(
)
const
Get accessor for "showText" property.
Returns Value of boolean "showText" property
See also setShowText()
◆ width()
double glbarcode::Barcode::width
(
)
const
Get actual width of barcode (may differ from requested width).
Returns Actual width of barcode (points)
See also setWidth()
The documentation for this class was generated from the following file: