## Class BarcodeObject

Description

Barcode Render Class for PHP using the GD graphics library.

- license: LGPL
- since: 2001-03-25
- version: 0.0.8a 2001-04-01 (original code)
- name: BarcodeObject
- author: Karim Mribti, Nicola Asuni

Located in /barcode/barcode.php (line 209)

Direct descendents

Class | Description
--- | ---
C39Object | Code 39 Barcode Render Class. Code 39 is an alphanumeric bar code that can encode decimal number, case alphabet and some special symbols.
C128AObject | Code 128-A Barcode Render Class for PHP using the GD graphics library. Code 128-A is a continuous, multilevel and include all upper case alphanumeric characters and ASCII control characters.
C128BObject | Code 128-B Barcode Render Class for PHP using the GD graphics library. Code 128-B is a continuous, multilevel and full ASCII code.
C128CObject | Code 128-C Barcode Render Class for PHP using the GD graphics library. Code 128-C is numeric only and provides the most efficiency.
I25Object | I25 Barcode Render Class for PHP using the GD graphics library.

Variable Summary
Background $mBgcolor
Brush $mBrush
Allowed $mChars
Character $mCharSet
Error $mError
Numeric $mFont
Image $mHeight
Image $mImg
Numeric $mStyle
Image $mWidth
Method Summary
BarcodeObject __construct ([int $Width = BCD_DEFAULT_WIDTH], [int $Height = BCD_DEFAULT_HEIGHT], [int $Style = BCD_DEFAULT_STYLE])
void DestroyObject ()
void DrawBorder ()
void DrawChar (int $Font, int $xPos, int $yPos, int $Char)
void DrawObject (int $xres)
bool DrawSingleBar (int $xPos, int $yPos, int $xSize, mixed $ySize)
void DrawText (int $Font, int $xPos, int $yPos, int $Char)
void FlushObject ()
string GetError ()
int GetFontHeight (int $font)
int GetFontWidth (int $font)
object image. getImage ()
int GetStyle ()
void SetFont (int $font)
void SetStyle (int $Style)
void __destructor ()
Variables
Background $mBgcolor (line 232)

- var: color.
- access: protected

Brush $mBrush (line 238)

- var: color.
- access: protected

Allowed $mChars (line 268)

- var: symbols.
- access: protected

Character $mCharSet (line 262)

- var: Set.
- access: protected

Error $mError (line 256)

- var: message.
- access: protected

Numeric $mFont (line 250)

- var: code for character font.
- access: protected

Image $mHeight (line 220)

- var: height in pixels.
- access: protected

Image $mImg (line 244)

- var: object.
- access: protected

Numeric $mStyle (line 226)

- var: code for Barcode style.
- access: protected

Image $mWidth (line 214)

- var: width in pixels.
- access: protected

Methods
Constructor __construct (line 276)

Class Constructor.

- access: public

BarcodeObject __construct ([int $Width = BCD_DEFAULT_WIDTH], [int $Height = BCD_DEFAULT_HEIGHT], [int $Style = BCD_DEFAULT_STYLE])

- int $Width: Image width in pixels.
- int $Height: Image height in pixels.
- int $Style: Barcode style.

Redefined in descendants as:

- C39Object::__construct() : Class Constructor.
- C128AObject::__construct() : Class Constructor.
- C128BObject::__construct() : Class Constructor.
- C128CObject::__construct() : Class Constructor.
- I25Object::__construct() : Class Constructor.

DestroyObject (line 441)

Destroy the barcode image.

- access: public

void DestroyObject ()
DrawBorder (line 324)

Draws the barcode border.

- access: protected

void DrawBorder ()
DrawChar (line 336)

Draws the alphanumeric code.

- access: protected

void DrawChar (int $Font, int $xPos, int $yPos, int $Char)

- int $Font: Font type.
- int $xPos: Horiziontal position.
- int $yPos: Vertical position.
- int $Char: Alphanumeric code to write.

DrawObject (line 315)

Abstract method used to draw the barcode image.

- access: public

void DrawObject (int $xres)

- int $xres: Horizontal resolution.

Redefined in descendants as:

- C39Object::DrawObject() : Draws the barcode object.
- C128AObject::DrawObject() : Draws the barcode object.
- C128BObject::DrawObject() : Draws the barcode object.
- C128CObject::DrawObject() : Draws the barcode object.
- I25Object::DrawObject() : Draws the barcode object.

DrawSingleBar (line 361)

Draws a single barcode bar.

- return: trur in case of success, false otherwise.
- access: protected

bool DrawSingleBar (int $xPos, int $yPos, int $xSize, mixed $ySize)

- int $xPos: Horiziontal position.
- int $yPos: Vertical position.
- int $xSize: Vertical size.

DrawText (line 348)

Draws a character string.

- access: protected

void DrawText (int $Font, int $xPos, int $yPos, int $Char)

- int $Font: Font type.
- int $xPos: Horiziontal position.
- int $yPos: Vertical position.
- int $Char: string to write.

FlushObject (line 425)

Flush the barcode image.

- access: public

void FlushObject ()
GetError (line 376)

Returns the current error message.

- return: error message.
- access: public

string GetError ()
GetFontHeight (line 385)

Returns the font height.

- return: font height.
- access: public

int GetFontHeight (int $font)

- int $font: font type.

GetFontWidth (line 394)

Returns the font width.

- return: font width.
- access: public

int GetFontWidth (int $font)

- int $font: font type.

getImage (line 307)

Returns the image object.

- access: public
- since: 1.5.2
- author: Nicola Asuni

object image. getImage ()
GetStyle (line 410)

Returns barcode style.

- return: barcode style.
- access: public

int GetStyle ()
SetFont (line 402)

Set font type.

- access: public

void SetFont (int $font)

- int $font: font type.

SetStyle (line 418)

Set barcode style.

- access: public

void SetStyle (int $Style)

- int $Style: barcode style.

__destructor (line 297)

Class Destructor.

Destroy image object.

- access: public

void __destructor ()

Documentation generated on Tue, 20 Mar 2007 13:24:33 +0100 by phpDocumentor 1.3.0RC3