Image_Canvas
[ class tree: Image_Canvas ] [ index: Image_Canvas ] [ all elements ]

Class: Image_Canvas_SWF

Source Location: /Image_Canvas-0.3.2/Image/Canvas/SWF.php

Class Overview

Image_Canvas
   |
   --Image_Canvas_SWF

SVG Canvas class.


Author(s):

Version:

  • Release: @package_version@

Copyright:

  • Copyright (C) 2003, 2004 Jesper Veggerby Hansen

Methods


Inherited Variables

Inherited Methods

Class: Image_Canvas

Image_Canvas::Image_Canvas()
Create the canvas.
Image_Canvas::addSpline()
Adds "splined" vertex to a polygon
Image_Canvas::addText()
Writes text
Image_Canvas::addVertex()
Adds vertex to a polygon
Image_Canvas::drawEnd()
Draw a line end
Image_Canvas::ellipse()
Draw an ellipse
Image_Canvas::endGroup()
End the "current" group.
Image_Canvas::factory()
Canvas factory method.
Image_Canvas::getHeight()
Get the height of the canvas
Image_Canvas::getWidth()
Get the width of the canvas
Image_Canvas::image()
Overlay image
Image_Canvas::line()
Draw a line
Image_Canvas::pieslice()
Draw a pie slice
Image_Canvas::polygon()
Draws a polygon
Image_Canvas::rectangle()
Draw a rectangle
Image_Canvas::reset()
Reset the canvas.
Image_Canvas::save()
Save the result of the canvas to a file
Image_Canvas::setClipping()
Set clipping to occur
Image_Canvas::setDefaultFont()
Sets the default font options.
Image_Canvas::setFill()
Sets the style of the filling of drawn objects.
Image_Canvas::setFillColor()
Sets the color of the filling of drawn objects
Image_Canvas::setFillImage()
Sets an image that should be used for filling
Image_Canvas::setFont()
Sets the font options.
Image_Canvas::setGradientFill()
Sets a gradient fill
Image_Canvas::setLineColor()
Sets the color of the line(s) to be drawn
Image_Canvas::setLineThickness()
Sets the thickness of the line(s) to be drawn
Image_Canvas::show()
Output the result of the canvas to the browser
Image_Canvas::startGroup()
Start a group.
Image_Canvas::textHeight()
Get the height of a text,
Image_Canvas::textWidth()
Get the width of a text,
Image_Canvas::toHtml()
Get a canvas specific HTML tag.

Class Details

[line 51]
SVG Canvas class.


[ Top ]


Method Detail

Image_Canvas_SWF (Constructor)   [line 89]

Image_Canvas_SWF Image_Canvas_SWF( $params, array $param)

Creates the SWF movie object

Parameters available:

'width' The width of the graph 'height' The height of the graph 'version' The flash version, supports up to version 6 'background' An array with the background color, e.g. array('red' => 255, 'green' => 0, 'blue' => 0) Either integers between 0 and 255 or hexadecimals between 0x00 and 0xFF


Parameters:

array   $param   —  Parameter array
   $params   — 

[ Top ]

addElement   [line 126]

void addElement( string $element)

Add an object to the movie
  • Access: public

Parameters:

string   $element   —  The element

[ Top ]

addText   [line 646]

void addText( $params)

Writes text

Parameter array: 'x' : int X-point of text 'y' : int Y-point of text 'text' : string The text to add 'color' : mixed [optional] The color of the text

  • Todo: Vertical alignment

Overrides Image_Canvas::addText() (Writes text)

Parameters:

   $params   — 

[ Top ]

drawEnd   [line 256]

void drawEnd( array $params)

Draw a line end

Parameter array: 'x' : int X point 'y' : int Y point 'end' : string The end type of the end 'size' : int The size of the end 'color' : string The color of the end 'angle' : int [optional] The angle with which to draw the end 'url' : string [optional] Target URL


Overrides Image_Canvas::drawEnd() (Draw a line end)

Parameters:

array   $params   —  Parameter array

[ Top ]

ellipse   [line 531]

void ellipse( array $params)

Draw an ellipse

Parameter array: 'x' : int X center point 'y' : int Y center point 'rx' : int X radius 'ry' : int Y radius 'fill' : mixed [optional] The fill color 'line' : mixed [optional] The line color 'url' : string [optional] Target URL


Overrides Image_Canvas::ellipse() (Draw an ellipse)

Parameters:

array   $params   —  Parameter array

[ Top ]

getData   [line 766]

object getData( )

Get SWF movie object

[ Top ]

image   [line 724]

void image( $params)

Overlay image

Parameter array: 'x' : int X-point of overlayed image 'y' : int Y-point of overlayed image 'filename' : string The filename of the image to overlay 'width' : int [optional] The width of the overlayed image (resizing if possible) 'height' : int [optional] The height of the overlayed image (resizing if possible) 'alignment' : array [optional] Alignment 'url' : string [optional] Target URL


Overrides Image_Canvas::image() (Overlay image)

Parameters:

   $params   — 

[ Top ]

line   [line 387]

void line( array $params)

Parameter array:

'x0' : int X start point 'y0' : int Y start point 'x1' : int X end point 'y1' : int Y end point 'color' : mixed [optional] The line color 'url' : string [optional] Target URL


Overrides Image_Canvas::line() (Draw a line)

Parameters:

array   $params   —  Parameter array

[ Top ]

pieslice   [line 601]

void pieslice( array $params)

Draw a pie slice

Parameter array: 'x' : int X center point 'y' : int Y center point 'rx' : int X radius 'ry' : int Y radius 'v1' : int The starting angle (in degrees) 'v2' : int The end angle (in degrees) 'srx' : int [optional] Starting X-radius of the pie slice (i.e. for a doughnut) 'sry' : int [optional] Starting Y-radius of the pie slice (i.e. for a doughnut) 'fill' : mixed [optional] The fill color 'line' : mixed [optional] The line color

  • Todo:

Overrides Image_Canvas::pieslice() (Draw a pie slice)

Parameters:

array   $params   —  Parameter array

[ Top ]

polygon   [line 425]

void polygon( [array $params = array()])

Parameter array:

'connect': bool [optional] Specifies whether the start point should be connected to the endpoint (closed polygon) or not (connected line) 'fill' : mixed [optional] The fill color 'line' : mixed [optional] The line color 'url' : string [optional] Target URL


Overrides Image_Canvas::polygon() (Draws a polygon)

Parameters:

array   $params   —  Parameter array

[ Top ]

rectangle   [line 475]

void rectangle( array $params)

Draw a rectangle

Parameter array: 'x0' : int X start point 'y0' : int Y start point 'x1' : int X end point 'y1' : int Y end point 'fill' : The fill style 'line' : The line style 'url' : string [optional] Target URL


Overrides Image_Canvas::rectangle() (Draw a rectangle)

Parameters:

array   $params   —  Parameter array

[ Top ]

save   [line 751]

void save( [array $param = false])

Save the SWF to a file

Overrides Image_Canvas::save() (Save the result of the canvas to a file)

Parameters:

array   $param   — 

Parameter array array('filename' => 'canvas.swf', 'compression' => 0)

The compression level can be a value between 0 and 9, defining the SWF compression similar to gzip compression. This parameter is only available as of Flash MX (6).


[ Top ]

setBackground   [line 114]

void setBackground( mixed $color)

Sets the background color

Values can be specified either as integers between 0 and 255 or as hexadecimals between 0x00 and 0xFF

  • Access: public

Parameters:

mixed   $color   —  Color

[ Top ]

setClipping   [line 783]

void setClipping( [ $params = false])

Set clipping to occur

Parameter array:

'x0' : int X point of Upper-left corner 'y0' : int X point of Upper-left corner 'x1' : int X point of lower-right corner 'y1' : int Y point of lower-right corner

  • Todo:

Overrides Image_Canvas::setClipping() (Set clipping to occur)

Parameters:

   $params   — 

[ Top ]

setFillImage   [line 208]

void setFillImage( string $filename)

Sets an image that should be used for filling
  • Todo:

Overrides Image_Canvas::setFillImage() (Sets an image that should be used for filling)

Parameters:

string   $filename   —  The filename of the image to fill with

[ Top ]

setFont   [line 234]

void setFont( $fontOptions, array $font)

Sets the font options.

The $font array may have the following entries: 'type' : 'ttf' (TrueType) or omitted for default
If 'type' is 'ttf' then the following can be specified
'size' : size in pixels
'angle' : the angle with which to write the text 'file' : the .ttf file (either the basename, filename or full path)


Overrides Image_Canvas::setFont() (Sets the font options.)

Parameters:

array   $font   —  The font options.
   $fontOptions   — 

[ Top ]

setGradientFill   [line 218]

void setGradientFill( array $gradient)

Sets a gradient fill
  • Todo:

Overrides Image_Canvas::setGradientFill() (Sets a gradient fill)

Parameters:

array   $gradient   —  Gradient fill options

[ Top ]

show   [line 734]

void show( [array $param = false])

Display the SWF

Overrides Image_Canvas::show() (Output the result of the canvas to the browser)

Parameters:

array   $param   —  Parameter array

[ Top ]

textHeight   [line 626]

int textHeight( string $text)

Get the height of a text,
  • Return: The height of the text

Overrides Image_Canvas::textHeight() (Get the height of a text,)

Parameters:

string   $text   —  The text to get the height of

[ Top ]

textWidth   [line 611]

int textWidth( string $text)

Get the width of a text,
  • Return: The width of the text

Overrides Image_Canvas::textWidth() (Get the width of a text,)

Parameters:

string   $text   —  The text to get the width of

[ Top ]

toHtml   [line 803]

void toHtml( $params)

Get an SWF specific HTML tag

This method implicitly saves the canvas to the filename in the filesystem path specified and parses it as URL specified by URL path

Parameter array: 'filename' : string 'filepath' : string Path to the file on the file system. Remember the final slash 'urlpath' : string Path to the file available through an URL. Remember the final slash 'width' : int The width in pixels 'height' : int The height in pixels 'quality' : Flash quality 'scale' : Scale 'menu' : Whether to display the Flash menu on mouse right-click


Overrides Image_Canvas::toHtml() (Get a canvas specific HTML tag.)

Parameters:

   $params   — 

[ Top ]


Documentation generated on Mon, 11 Mar 2019 15:33:11 -0400 by phpDocumentor 1.4.4. PEAR Logo Copyright © PHP Group 2004.