|
|
File: /data/customers/alex/htdocs/include/pc4p_text.inc
PC4P - pc4p
pc4p_text
pc4p_object | +-- pc4p_text
Text object provides text-funktionality
|
private class pc4p_text extends pc4p_object
Text object provides text-funktionality
|
|
|
|
|
|
|
Private Field Summary |
array |
$marginMargins for this text |
string |
$fontnameFontname for this text |
integer |
$fontsizeFontsize for this text |
string |
$encodingEncoding used for this text |
integer |
$underlineUnderline for this text |
string |
$textText for this text...haha |
|
Public Method Details |
pc4p_text |
public void pc4p_text( object pc4p_page &$parent )
|
|
Constructor
|
Parameter |
|
object pc4p_page |
&$parent |
|
|
|
|
Returns |
void |
Author(s) |
Alexander Wirtz <wirtz@web-active.com> |
|
pc4p_set_font |
public void pc4p_set_font( string $fontname, [ integer $fontsize, string $encoding ] )
|
|
Sets the font for this object.
|
Parameter |
|
|
|
integer |
$fontsize |
= >>10<< |
|
|
|
|
string |
$encoding |
= >>"host"<< |
|
|
|
Returns |
void |
Author(s) |
Alexander Wirtz <wirtz@web-active.com> |
|
pc4p_set_text |
public void pc4p_set_text( string $text )
|
|
Sets the text which the object shall print later on
|
Parameter |
|
|
Returns |
void |
Author(s) |
Alexander Wirtz <wirtz@web-active.com> |
|
pc4p_set_underline |
public void pc4p_set_underline( )
|
|
Shall the text have an underline?
|
Returns |
void |
Author(s) |
Alexander Wirtz <wirtz@web-active.com> |
|
pc4p_draw |
public void pc4p_draw( )
|
|
Draws the text for the set fontoptions.
Warning: documentation is missing.
|
Returns |
void |
Author(s) |
Alexander Wirtz <wirtz@web-active.com> |
|
|
Private Method Details |
pc4p_linefeed |
private integer pc4p_linefeed( string &$text )
|
|
Formats the text for the actual width and inserts | where a newline
shall occur during print out. Returns the rows which the text needs.
|
Parameter |
|
|
Returns |
integer $rowcount |
Author(s) |
Alexander Wirtz <wirtz@web-active.com> |
|
pc4p_calc_alignment |
private integer pc4p_calc_alignment( string $text )
|
|
Calculates the position of the text according to the set alignment
|
Parameter |
|
|
Returns |
integer $act_width |
Author(s) |
Alexander Wirtz <wirtz@web-active.com> |
|
pc4p_calc_offset |
private int pc4p_calc_offset( object pc4p_page &$parent )
|
|
Calculates the stringwidth for the current text and font in the
object and applies linefeed where necessary. Returns the sizefor the complete object.
Warning: documentation is missing.
|
Parameter |
|
object pc4p_page |
&$parent |
|
|
|
|
Returns |
int $this ->height |
Author(s) |
Alexander Wirtz <wirtz@web-active.com> |
|
|
Private Field Details |
$margin |
private array $margin
>>array( "top" => 0, "bottom" => 0, "left" => 0, "right" => 0 ) <<
Margins for this text
|
|
$fontname |
private string $fontname
>>"Times-Roman" <<
Fontname for this text
|
|
$fontsize |
private integer $fontsize
>>10 <<
Fontsize for this text
|
|
$encoding |
private string $encoding
>>"host" <<
Encoding used for this text
|
|
$underline |
private integer $underline
>> <<
Underline for this text
|
|
$text |
private string $text
>> <<
Text for this text...haha
|
|
|
|
|
PHPDoc 1.0beta |