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 BarcodeObject ([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)
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 BarcodeObject (line 276)

Class Constructor.

BarcodeObject BarcodeObject ([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.
DestroyObject (line 433)

Destroy the barcode image.

void DestroyObject ()
DrawBorder (line 316)

Draws the barcode border.

  • access: protected
void DrawBorder ()
DrawChar (line 328)

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 307)

Abstract method used to draw the barcode image.

void DrawObject (int $xres)
  • int $xres: Horizontal resolution.

Redefined in descendants as:
DrawSingleBar (line 353)

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 340)

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 417)

Flush the barcode image.

void FlushObject ()
GetError (line 368)

Returns the current error message.

  • return: error message.
string GetError ()
GetFontHeight (line 377)

Returns the font height.

  • return: font height.
int GetFontHeight (int $font)
  • int $font: font type.
GetFontWidth (line 386)

Returns the font width.

  • return: font width.
int GetFontWidth (int $font)
  • int $font: font type.
getImage (line 299)

Returns the image object.

  • since: 1.5.2
  • author: Nicola Asuni
object image. getImage ()
GetStyle (line 402)

Returns barcode style.

  • return: barcode style.
int GetStyle ()
SetFont (line 394)

Set font type.

void SetFont (int $font)
  • int $font: font type.
SetStyle (line 410)

Set barcode style.

void SetStyle (int $Style)
  • int $Style: barcode style.

Documentation generated on Sun, 29 Oct 2006 08:40:03 +0100 by phpDocumentor 1.3.0RC3