Class TextProperty
(Defined in: jpgraph_gantt.php : 1547)
 
 TextProperty 
 Align() 
 Set() 
 SetAlign() 
 SetColor() 
 SetFont() 
 Show() 
 

Class usage and Overview
This is very similair to Text but this is only used as an internal helper class in Gantt chart. In comparison with text it has the added funtionality that it can handle tabs. In the next version of JpGraph the extra functionality that this class has should be added to the real class Text() to make the class more orthogonal. Since this is just an internal helper class it has its justified position though. This was oroginally considered a very experimental text class and it made sence to compartmetn thath functionlity in a separate class to the stnadard Text() class.

 

See also related classes:
Text

 


Class Methods

 

TextProperty ::
Align($aHAlign, $aVAlign)
Specify vertical and horizontal alignment

ArgumentDefaultDescription
$aHAlign  Horizontal alignment
$aVAlign "bottom" Vertical alignment

Description:
Specify the anchor point fo the text. The anchor point determines how the texts x,y positions should be interpretated.  

 

TextProperty ::
Set($aTxt)
Specify text string

ArgumentDefaultDescription
$aTxt  Text string

Description:
Specify text string 

Example:

$graph->title->Set("Overview for year 2002");

 

TextProperty ::
SetAlign($aHAlign, $aVAlign)
Specify alignment for text

ArgumentDefaultDescription
$aHAlign  Horizontal alignment
$aVAlign "bottom" Vertical alignment

Description:
Specify alignment for text. Same as TextProperty::Align() 
 
See also:

 

TextProperty ::
SetColor($aColor)
Set text color

ArgumentDefaultDescription
$aColor  Color

Description:
Specify text color 

Example:

SetColor('red:0.6');

 

TextProperty ::
SetFont($aFFamily, $aFStyle, $aFSize)
Specify font

ArgumentDefaultDescription
$aFFamily  Font family
$aFStyle FS_NORMAL Font style
$aFSize 10 Font size

Description:
Specify font family, size and style. Two major types of font families can be used, builtin bitmnapped fonts or TTF fonts. The builtin fonts have a fixed size which can't be altered. Valid styles are Valid values for the internal font families are Note: FF_FONT0 only suppor font style FS_NORMAL The available TTF are by default  
 
See also:

Example:

SetFont(FF_ARIAL,FS_NORMAL,12)

 

TextProperty ::
Show($aShow)
Unhide/hide the text

ArgumentDefaultDescription
$aShow true True=Show text

Description:
Specify if the text should be displayed or hidden