Packageindex Classtrees Modulegroups Elementlist Report XML Files

pc4p

pc4p_line

pc4p_object
  |
  +-- pc4p_line

private class pc4p_line extends pc4p_object

Provides functionality for drawing lines

AuthorsAlexander Wirtz <alex@pc4p.net>
Version$Id: pc4p_line.html,v 1.14.2.1 2002/08/12 22:47:08 eru Exp $

 

Methods inherited from pc4p_object

pc4p_object, pc4p_calc_rot, pc4p_calc_rot_dim, pc4p_set_rot, pc4p_set_margin, pc4p_set_width, pc4p_set_alignment, pc4p_set_textleading, pc4p_set_linecolor, pc4p_set_fillcolor, pc4p_make_objcopy, pc4p_draw_children

Public Method Summary

void pc4p_line(object pc4p_page &$parent)
pc4p_line constructor
void pc4p_set_linestyle(string $style)
Sets the style for the line
void pc4p_set_linewidth(float $width)
Sets the width of the line
float pc4p_get_linewidth()
Returns the total (!) width of the line

Private Method Summary

void pc4p_calc_linejoin(object pc4p_line &$h_line1, object pc4p_line &$v_line1, object pc4p_line &$h_line2, object pc4p_line &$v_line2)
Calculate the ends of the lines
void pc4p_draw()
Draw-function for the lineWarning: documentation is missing.
integer pc4p_calc_offset(object pc4p_page &$parent)
Calculates the dimensions for the lineWarning: documentation is missing.

Fields inherited from pc4p_object

$children, $pdfp, $pdfobj, $pagewidth, $pageheight, $width, $height, $act_x, $act_y, $draw_x, $draw_y, $alignment, $phi, $leading, $linecolor, $fillcolor

Public Field Summary

array $margin
Margins for the line
string $linestyle
Style of the line
float $linewidth
Width of the line

Private Field Summary

array $linemeet
Factors to correct the lines when they meet

Public Method Details

pc4p_line

public void pc4p_line(object pc4p_page &$parent)

  Calls the constructor of pc4p_object

Parameter
object pc4p_page &$parent
Parent of the line
Returns void

See Also pc4p_object::pc4p_object()
Author(s) Alexander Wirtz <alex@pc4p.net>

pc4p_set_linestyle

public void pc4p_set_linestyle(string $style)

  Well, it lets you define, what line you want...

Parameter
string $style
Valid values are "none", "single" or "double"
Returns void

Author(s) Alexander Wirtz <alex@pc4p.net>

pc4p_set_linewidth

public void pc4p_set_linewidth(float $width)

  Guess what, with that func you define the linewidth!

Parameter
float $width
Values >= 0 are accepted
Returns void

Author(s) Alexander Wirtz <alex@pc4p.net>

pc4p_get_linewidth

public float pc4p_get_linewidth()

  This function returns the width according to the style

Returns float $linewidth

Calculated total width of the line

Author(s) Alexander Wirtz <alex@pc4p.net>

Private Method Details

pc4p_calc_linejoin

private void pc4p_calc_linejoin(object pc4p_line &$h_line1, object pc4p_line &$v_line1, object pc4p_line &$h_line2, object pc4p_line &$v_line2)

  When the lines meet in a corner, their ends have to be adjusted, so that everything fits smugly together. Well, this function handles that task...and it's no easy task at that. This function is ugly, if someone is capable of beautifying this, please send me an email...

Parameter
object pc4p_line &$h_line1
Upper horizontal line
object pc4p_line &$v_line1
Left vertical line
object pc4p_line &$h_line2
Lower horizontal line
object pc4p_line &$v_line2
Right vertical line
Returns void

See Also pc4p_line::pc4p_get_linewidth()
Author(s) Alexander Wirtz <alex@pc4p.net>

pc4p_draw

private void pc4p_draw()

  Draws the line according to the linestyle

Warning: documentation is missing.

Returns void

See Also pc4p_object::pc4p_calc_rot(), pc4p_object::pc4p_calc_rot_dim()
Author(s) Alexander Wirtz <alex@pc4p.net>

pc4p_calc_offset

private integer pc4p_calc_offset(object pc4p_page &$parent)

  Sets its own offsets according to linestyle...nothing spectacular

Warning: documentation is missing.

Parameter
object pc4p_page &$parent
Parent of the image
Returns integer $this

->height Calculated height of the line

See Also pc4p_object::pc4p_calc_rot_dim()
Author(s) Alexander Wirtz <alex@pc4p.net>

Public Field Details

$margin

public array $margin

>>array( "top" => 0, "bottom" => 0, "left" => 0, "right" => 0 )<<


$linestyle

public string $linestyle

>>"single"<<


$linewidth

public float $linewidth

>>1<<


Private Field Details

$linemeet

private array $linemeet

>>array( 0, 0, 0, 0 )<<



Packageindex Classtrees Modulegroups Elementlist Report XML Files
Generated on Tue, 13 Aug 2002 00:43:10 +0200 by PHPDoc v1.5 www.phpdoc.de