\JoinDraw

--------------------------------------------------------------------

Enable to join 2 BCGDrawing or 2 image object to make only one image. There are some options for alignment.


Copyright (C) Jean-Sebastien Goupil http://www.barcodephp.com

Summary

Methods
Properties
Constants
__construct()
__destruct()
get_im()
No public properties found
ALIGN_RIGHT
ALIGN_BOTTOM
ALIGN_LEFT
ALIGN_TOP
ALIGN_CENTER
POSITION_RIGHT
POSITION_BOTTOM
POSITION_LEFT
POSITION_TOP
No protected methods found
No protected properties found
N/A
findPosition()
changeAlignment()
createIm()
$image1
$image2
$alignement
$position
$space
$im
N/A

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 : 

Type

$image2

$image2 : 

Type

$alignement

$alignement : 

Type

$position

$position : 

Type

$space

$space : 

Type

$im

$im : 

Type

Methods

__construct()

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

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
\BCGColor $background
integer $space
integer $position
integer $alignment

__destruct()

__destruct() 

Destroys the image.

get_im()

get_im() : resource

Returns the new $im created.

Returns

resource

findPosition()

findPosition(integer  $size1, integer  $size2,   $alignment) : integer

Finds the position where the barcode should be aligned.

Parameters

integer $size1
integer $size2
$alignment

Returns

integer

changeAlignment()

changeAlignment(integer  $alignment) : integer

Change the alignments.

Parameters

integer $alignment

Returns

integer

createIm()

createIm() 

Creates the image.