[ Index ] |
|
Code source de vtiger CRM 5.0.2 |
[Code source] [Imprimer] [Statistiques]
Class for handling output in SVG format. LICENSE: This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. This library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this library; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
Author: | Jesper Veggerby <pear.nosey@veggerby.dk> |
Copyright: | Copyright (C) 2003, 2004 Jesper Veggerby Hansen |
License: | http://www.gnu.org/copyleft/lesser.html LGPL License 2.1 |
Version: | CVS: $Id: SVG.php,v 1.12 2006/02/13 20:53:20 nosey Exp $ |
Poids: | 918 lignes (32 kb) |
Inclus ou requis: | 0 fois |
Référencé: | 0 fois |
Nécessite: | 2 fichiers Image/Canvas.php Image/Canvas/Color.php |
Image_Canvas_SVG:: (25 méthodes):
Image_Canvas_SVG()
_addElement()
_addDefine()
_color()
_opacity()
_getLineStyle()
_getFillStyle()
setFillImage()
setGradientFill()
setFont()
line()
polygon()
rectangle()
ellipse()
pieslice()
textWidth()
textHeight()
addText()
image()
startGroup()
endGroup()
show()
save()
setClipping()
toHtml()
Classe: Image_Canvas_SVG - X-Ref
SVG Canvas class.Image_Canvas_SVG($param) X-Ref |
Create the SVG canvas. Parameters available: 'width' The width of the graph 'height' The height of the graph param: array $param Parameter array |
_addElement($element, $params = array() X-Ref |
Add a SVG "element" to the output param: string $element The element |
_addDefine($def) X-Ref |
Add a SVG "define" to the output param: string $def The define |
_color($color = false) X-Ref |
Get the color index for the RGB color param: int $color The color return: int A SVG compatible color |
_opacity($color = false) X-Ref |
Get the opacity for the RGB color param: int $color The color return: int A SVG compatible opacity value |
_getLineStyle($lineStyle = false) X-Ref |
Get the SVG applicable linestyle param: mixed $lineStyle The line style to return, false if the one return: mixed A SVG compatible linestyle |
_getFillStyle($fillStyle = false) X-Ref |
Get the SVG applicable fillstyle param: mixed $fillStyle The fillstyle to return, false if the one return: mixed A SVG compatible fillstyle |
setFillImage($filename) X-Ref |
Sets an image that should be used for filling param: string $filename The filename of the image to fill with |
setGradientFill($gradient) X-Ref |
Sets a gradient fill param: array $gradient Gradient fill options |
setFont($fontOptions) X-Ref |
Sets the font options. The $font array may have the following entries: 'type' = 'ttf' (TrueType) or omitted for default<br> If 'type' = 'ttf' then the following can be specified<br> 'size' = size in pixels<br> 'angle' = the angle with which to write the text 'file' = the .ttf file (either the basename, filename or full path) param: array $font The font options. |
line($params) X-Ref |
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 param: array $params Parameter array |
polygon($params = array() X-Ref |
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 param: array $params Parameter array |
rectangle($params) X-Ref |
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': mixed [optional] The fill color 'line': mixed [optional] The line color param: array $params Parameter array |
ellipse($params) X-Ref |
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 param: array $params Parameter array |
pieslice($params) X-Ref |
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 param: array $params Parameter array |
textWidth($text) X-Ref |
Get the width of a text, param: string $text The text to get the width of return: int The width of the text |
textHeight($text) X-Ref |
Get the height of a text, param: string $text The text to get the height of return: int The height of the text |
addText($params) X-Ref |
Writes text Parameter array: 'x': int X-point of text 'y': int Y-point of text 'text': string The text to add 'alignment': array [optional] Alignment 'color': mixed [optional] The color of the text |
image($params) X-Ref |
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 |
startGroup($name = false) X-Ref |
Start a group. What this does, depends on the canvas/format. param: string $name The name of the group |
endGroup() X-Ref |
End the "current" group. What this does, depends on the canvas/format. |
show($param = false) X-Ref |
Output the result of the canvas param: array $param Parameter array |
save($param = false) X-Ref |
Output the result of the canvas param: array $param Parameter array |
setClipping($params = false) X-Ref |
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 |
toHtml($params) X-Ref |
Get a canvas 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 |
Généré le : Sun Feb 25 10:22:19 2007 | par Balluche grâce à PHPXref 0.7 |