|
|
File: /data/customers/alex/htdocs/include/pc4p_page.inc
PC4P - pc4p
pc4p_page
pc4p_page
Supplies pagehandling ability
|
private class pc4p_page
Supplies pagehandling ability
|
|
|
|
|
Private Field Summary |
array |
$childrenArray of all children of this object |
integer |
$pdfpPDF-Pointer used for all pdf_* |
integer |
$widthWidth of the page |
integer |
$heightHeight of the page |
array |
$marginMargins for the page |
integer |
$act_widthx-Pos where the page really starts placing objects |
integer |
$act_heighty-Pos where the page really starts placing objects |
integer |
$draw_heighty-Pos used when calculating the positions for the objects |
string |
$bg_imageName of the background image |
string |
$bgi_typeType of the background image |
integer |
$bgi_xoffx-Pos for the background image |
integer |
$bgi_yoffy-Pos for the background image |
float |
$bgi_scaleScale for the background image |
|
Public Method Details |
pc4p_page |
public void pc4p_page( object pc4p_page &$parent, string $format, string $dimensions )
|
|
Constructor
|
Parameter |
|
object pc4p_page |
&$parent |
|
|
|
|
|
|
|
|
Returns |
void |
Author(s) |
Alexander Wirtz <wirtz@web-active.com> |
|
pc4p_set_margin |
public void pc4p_set_margin( array $margin )
|
|
Sets the margins for the page
|
Parameter |
|
|
Returns |
void |
Author(s) |
Alexander Wirtz <wirtz@web-active.com> |
|
pc4p_set_bgimage |
public void pc4p_set_bgimage( string $imgfile, string $imgtype, integer $xoffset, integer $yoffset, [ float $scale ] )
|
|
Sets a background image for this page
|
Parameter |
|
|
|
|
|
|
|
|
|
|
Returns |
void |
Author(s) |
Alexander Wirtz <wirtz@web-active.com> |
|
pc4p_draw |
public void pc4p_draw( object pc4p_main &$parent )
|
|
Begins the page with the dimensions, calls the draw for each child
and closes the page.Called as last function in the class.
|
Parameter |
|
object pc4p_main |
&$parent |
|
|
|
|
Returns |
void |
Author(s) |
Alexander Wirtz <wirtz@web-active.com> |
|
|
Private Method Details |
pc4p_draw_children |
private void pc4p_draw_children( )
|
|
Calls the draw function for each child in the children-array
|
Returns |
void |
Author(s) |
Alexander Wirtz <wirtz@web-active.com> |
|
pc4p_calc_offset |
private void pc4p_calc_offset( object pc4p_page &$parent )
|
|
Calls the calc_offset function in all children. Checks, if the current object
still fits onto the page. If not, it checks if there's a following page; ifnot, it creates one, if yes it uses the existing. Moves the overlappingobjects to the new page. In one word: Here's the pagebreak function!!!
|
Parameter |
|
object pc4p_page |
&$parent |
|
|
|
|
Returns |
void |
Author(s) |
Alexander Wirtz <wirtz@web-active.com> |
|
|
Private Field Details |
$children |
private array $children
>>array() <<
Array of all children of this object
|
|
$pdfp |
private integer $pdfp
>> <<
PDF-Pointer used for all pdf_*
|
|
$width |
private integer $width
>> <<
Width of the page
|
|
$height |
private integer $height
>> <<
Height of the page
|
|
$margin |
private array $margin
>>array( "top" => 5, "bottom" => 5, "left" => 5, "right" => 5 ) <<
Margins for the page
|
|
$act_width |
private integer $act_width
>> <<
x-Pos where the page really starts placing objects
|
|
$act_height |
private integer $act_height
>> <<
y-Pos where the page really starts placing objects
|
|
$draw_height |
private integer $draw_height
>> <<
y-Pos used when calculating the positions for the objects
|
|
$bg_image |
private string $bg_image
>> <<
Name of the background image
|
|
$bgi_type |
private string $bgi_type
>> <<
Type of the background image
|
|
$bgi_xoff |
private integer $bgi_xoff
>> <<
x-Pos for the background image
|
|
$bgi_yoff |
private integer $bgi_yoff
>> <<
y-Pos for the background image
|
|
$bgi_scale |
private float $bgi_scale
>> <<
Scale for the background image
|
|
|
|
|
PHPDoc 1.0beta |