[ class tree: phpchartPlus ] [ index: phpchartPlus ] [ all elements ]

Class: Font

Source Location: /Font.php

Class Overview


Draws characters in the chart image


Author(s):

Variables

Methods



Class Details

[line 20]
Draws characters in the chart image

This class is used to draw characters in the chart image according to a set of user-defined properties




Tags:

final:  
license:  GNU Public License
author:  Tsiavos Chris <jaames@freemail.gr>


[ Top ]


Class Variables

$Canvas =

[line 27]

reference to the image handler the font will be used in



Tags:

access:  private

Type:   mixed


[ Top ]

$ColorAllocator =

[line 34]

reference to the ColorAllocator the class will use for allocating the font color



Tags:

access:  private

Type:   ColorAllocator


[ Top ]

$FontColor =

[line 48]

the font color the class will use for drawing characters in the chart image



Tags:

access:  private

Type:   string


[ Top ]

$FontFileLocation =

[line 41]

the file path containing the desired FreeType2 font



Tags:

access:  private

Type:   string


[ Top ]

$FontHeight =

[line 69]

the font height of the built-in font



Tags:

access:  private

Type:   mixed


[ Top ]

$FontSize =

[line 55]

the font size



Tags:

access:  private

Type:   integer


[ Top ]

$FontWidth =

[line 62]

the font width of the built-in font



Tags:

access:  private

Type:   integer


[ Top ]



Class Methods


constructor __construct [line 74]

Font __construct( )

Constructor



[ Top ]

method draw_String [line 127]

void draw_String( integer $XPos, mixed $YPos, string $Text, string $Color, integet $Ypos)



Tags:

access:  public


Parameters:

integer   $XPos   the x-value of the position the string will be drawn
integet   $Ypos   the y-value of the position the string will be drawn
string   $Text  
string   $Color   the color of the drawn string

[ Top ]

method get_FontMetrics [line 102]

associative get_FontMetrics( string $Text)

Returns the font metrics (font width,font height) of the selected font (FreeType2 or built-in)



Tags:

return:  array
access:  public


Parameters:

string   $Text  

[ Top ]

method set_Properties [line 86]

void set_Properties( mixed &$Canvas, ColorAllocator &$ColorAllocator, FontFileLocation $FontFileLocation, mixed $FontSize, integer $FontWidth, integer $FontHeight, integer $FontFize)

Sets the font properties



Parameters:

mixed   $Canvas   Reference to the image handler
ColorAllocator   $ColorAllocator   Reference to the ColorAllocator instance
FontFileLocation   $FontFileLocation   The file path containing the desired FreeType2 font
integer   $FontFize   The font size
integer   $FontWidth   The font width of the built-in font used when $FontFileLocation is null
integer   $FontHeight   The font height of the built-in font used when $FontFileLocation is null

[ Top ]


Documentation generated on Sun, 3 Oct 2004 14:59:16 +0300 by phpDocumentor 1.3.0RC3