Packageindex Classtrees Modulegroups Elementlist Report XML Files

pc4p

pc4p_image

pc4p_object
  |
  +-- pc4p_image

private class pc4p_image extends pc4p_object

Provides functionality for adding images to the page

AuthorsAlexander Wirtz <alex@pc4p.net>
Version$Id: pc4p_image.html,v 1.16.2.1 2002/08/12 22:47:06 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_image(object pc4p_page &$parent)
pc4p_image constructor
void pc4p_set_imagescale(float $scale)
Sets the imagescale for this object.
void pc4p_set_weblink(string $weblink, [ string $style, integer $width, string $color ])
Sets a weblink for this object.
void pc4p_set_image(mixed $image)
Sets the image for this object.

Private Method Summary

void pc4p_draw()
Draw-function for the imageWarning: documentation is missing.
integer pc4p_calc_offset(object pc4p_page &$parent)
Calculates the dimensions for the imageWarning: 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

Private Field Summary

array $margin
Margins for the image
array $weblink
Weblink for the object
integer $pim
Pointer to the image
mixed $imgfile
Name or resource of the image
string $imgtype
Type of the image
float $imgscale
Scale of the image

Public Method Details

pc4p_image

public void pc4p_image(object pc4p_page &$parent)

  Calls the constructor of pc4p_object

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

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

pc4p_set_imagescale

public void pc4p_set_imagescale(float $scale)

  Needed for resizing the image

Parameter
float $scale
Accepts any float (example: 0.5 is half the size)
Returns void

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

pc4p_set_weblink

public void pc4p_set_weblink(string $weblink, [ string $style, integer $width, string $color ])

  Add a weblink to this object, that will be opened on clicking on this object

Parameter
string $weblink
The URI of the weblink
string $style = >>""<<
The style of the border representing the weblink; "solid" or "dashed"
integer $width = >>-1<<
The width of the border representing the weblink; 0 represents an invisible border
string $color = >>""<<
The color of the border representing the weblink; you can use one of the 16 standardcolors from HTML or the hex-notation (#rrggbb)
Returns void

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

pc4p_set_image

public void pc4p_set_image(mixed $image)

  To set the image-name, you'll call this function. Checks, if you have a valid image-type

Parameter
mixed $image
The name of the image or a valid resource of a PHP-created image
Returns void

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

Private Method Details

pc4p_draw

private void pc4p_draw()

  Opens the image file, rotates the coordinate-system if neccessary and places the image on the page.

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)

  Checks, if the width of the image doesn't exceed the parent width. If yes, it changes the scale. Calculates the rotation-dimensions, if neccessary. Sets the alignment of the image

Warning: documentation is missing.

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

->height Calculated height of the image

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

Private Field Details

$margin

private array $margin

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


$weblink

private array $weblink

>>array( "URI" => "", "style" => "solid", "width" => 1, "color" => array( 0, 0, 0 ) )<<


$pim

private integer $pim

>><<


$imgfile

private mixed $imgfile

>><<


$imgtype

private string $imgtype

>><<


$imgscale

private float $imgscale

>>1<<



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