Constants

ALIGN_RIGHT

ALIGN_RIGHT = 0

ALIGN_BOTTOM

ALIGN_BOTTOM = 0

ALIGN_LEFT

ALIGN_LEFT = 1

ALIGN_TOP

ALIGN_TOP = 1

ALIGN_CENTER

ALIGN_CENTER = 2

POSITION_RIGHT

POSITION_RIGHT = 0

POSITION_BOTTOM

POSITION_BOTTOM = 1

POSITION_LEFT

POSITION_LEFT = 2

POSITION_TOP

POSITION_TOP = 3

Properties

$image1

$image1

$image2

$image2

$alignement

$alignement

$position

$position

$space

$space

$im

$im

Methods

__construct()

__construct(mixed  $image1, mixed  $image2, \BarcodeBakery\Common\BCGColor  $background, int  $space = 10, int  $position = self::POSITION_RIGHT, int  $alignment = self::ALIGN_TOP) : mixed

Construct the JoinDrawing Object.

  • $image1 and $image2 have to be BCGDrawing object or image object.
  • $space is the space between the two graphics in pixel.
  • $position is the position of the $image2 depending the $image1.
  • $alignment is the alignment of the $image2 if this one is smaller than $image1; if $image2 is bigger than $image1, the $image1 will be positionned on the opposite side specified.

Parameters

mixed $image1
mixed $image2
\BarcodeBakery\Common\BCGColor $background
int $space
int $position
int $alignment

Returns

mixed —

__destruct()

__destruct() : mixed

Destroys the image.

Returns

mixed —

get_im()

get_im() : resource

Returns the new $im created.

Returns

resource —

findPosition()

findPosition(int  $size1, int  $size2, mixed  $alignment) : int

Finds the position where the barcode should be aligned.

Parameters

int $size1
int $size2
mixed $alignment

Returns

int —

changeAlignment()

changeAlignment(int  $alignment) : int

Change the alignments.

Parameters

int $alignment

Returns

int —

createIm()

createIm() : mixed

Creates the image.

Returns

mixed —