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

Class: Image_Graph_Driver_SVG

Source Location: /Image_Graph-0.3.0/Graph/Driver/SVG.php

Class Overview

Image_Graph_Driver
   |
   --Image_Graph_Driver_SVG

SVG Driver class.


Author(s):

Version:

  • Release: @package_version@

Copyright:

  • Copyright (C) 2003, 2004 Jesper Veggerby Hansen

Methods


Inherited Variables

Inherited Methods

Class: Image_Graph_Driver

Image_Graph_Driver::Image_Graph_Driver()
Create the driver.
Image_Graph_Driver::done()
Output the result of the driver
Image_Graph_Driver::ellipse()
Draw an ellipse
Image_Graph_Driver::endGroup()
End the "current" group.
Image_Graph_Driver::factory()
Driver factory method.
Image_Graph_Driver::getHeight()
Get the height of the canvas
Image_Graph_Driver::getWidth()
Get the width of the canvas
Image_Graph_Driver::line()
Draw a line
Image_Graph_Driver::overlayImage()
Overlay image
Image_Graph_Driver::pieSlice()
Draw a pie slice
Image_Graph_Driver::polygonAdd()
Adds vertex to a polygon
Image_Graph_Driver::polygonEnd()
Draws a polygon
Image_Graph_Driver::rectangle()
Draw a rectangle
Image_Graph_Driver::setDefaultFont()
Sets the default font options.
Image_Graph_Driver::setFill()
Sets the style of the filling of drawn objects.
Image_Graph_Driver::setFillColor()
Sets the color of the filling of drawn objects
Image_Graph_Driver::setFillImage()
Sets an image that should be used for filling
Image_Graph_Driver::setFont()
Sets the font options.
Image_Graph_Driver::setGradientFill()
Sets a gradient fill
Image_Graph_Driver::setLineColor()
Sets the color of the line(s) to be drawn
Image_Graph_Driver::setLineThickness()
Sets the thickness of the line(s) to be drawn
Image_Graph_Driver::splineAdd()
Adds vertex to a polygon
Image_Graph_Driver::splineEnd()
Draws a polygon
Image_Graph_Driver::startGroup()
Start a group.
Image_Graph_Driver::textHeight()
Get the height of a text,
Image_Graph_Driver::textWidth()
Get the width of a text,
Image_Graph_Driver::write()
Writes text

Class Details

[line 60]
SVG Driver class.


[ Top ]


Method Detail

Image_Graph_Driver_SVG (Constructor)   [line 109]

Image_Graph_Driver_SVG &Image_Graph_Driver_SVG( array $param)

Create the SVG driver.

Parameters available:

'width' The width of the graph

'height' The height of the graph


Parameters:

array   $param   —  Parameter array

[ Top ]

done   [line 744]

void done( [array $param = false])

Output the result of the driver
  • Abstract:

Overrides Image_Graph_Driver::done() (Output the result of the driver)

Parameters:

array   $param   —  Parameter array

[ Top ]

ellipse   [line 534]

void ellipse( int $x, int $y, int $rx, int $ry, [mixed $fillColor = false], [mixed $lineColor = false])

Draw an ellipse

Overrides Image_Graph_Driver::ellipse() (Draw an ellipse)

Parameters:

int   $x   —  Center point x-value
int   $y   —  Center point y-value
int   $rx   —  X-radius of ellipse
int   $ry   —  Y-radius of ellipse
mixed   $fillColor   —  The fill color, can be omitted
mixed   $lineColor   —  The line color, can be omitted

[ Top ]

endGroup   [line 732]

void endGroup( )

End the "current" group.

What this does, depends on the driver/format.


Overrides Image_Graph_Driver::endGroup() (End the "current" group.)
[ Top ]

line   [line 392]

void line( int $x0, int $y0, int $x1, int $y1, [mixed $color = false])

Draw a line

Overrides Image_Graph_Driver::line() (Draw a line)

Parameters:

int   $x0   —  X start point
int   $y0   —  X start point
int   $x1   —  X end point
int   $y1   —  Y end point
mixed   $color   —  The line color, can be omitted

[ Top ]

overlayImage   [line 695]

void overlayImage( int $x, int $y, string $filename, [int $width = false], [int $height = false])

Overlay image

Overrides Image_Graph_Driver::overlayImage() (Overlay image)

Parameters:

int   $x   —  X-point of overlayed image
int   $y   —  Y-point of overlayed image
string   $filename   —  The filename of the image to overlay
int   $width   —  The width of the overlayed image (resizing if possible)
int   $height   —  The height of the overlayed image (resizing if possible)

[ Top ]

pieSlice   [line 563]

void pieSlice( int $x, int $y, int $rx, int $ry, int $v1, int $v2, [mixed $fillColor = false], [mixed $lineColor = false])

Draw a pie slice

Overrides Image_Graph_Driver::pieSlice() (Draw a pie slice)

Parameters:

int   $x   —  Center point x-value
int   $y   —  Center point y-value
int   $rx   —  X-radius of ellipse
int   $ry   —  Y-radius of ellipse
int   $v1   —  The starting angle
int   $v2   —  The end angle
mixed   $fillColor   —  The fill color, can be omitted
mixed   $lineColor   —  The line color, can be omitted

[ Top ]

polygonEnd   [line 417]

void polygonEnd( [bool $connectEnds = true], [mixed $fillColor = false], [mixed $lineColor = false])

Draws a polygon

Overrides Image_Graph_Driver::polygonEnd() (Draws a polygon)

Parameters:

bool   $connectEnds   —  Specifies whether the start point should be connected to the endpoint (closed polygon) or not (connected line)
mixed   $fillColor   —  The fill color, can be omitted
mixed   $lineColor   —  The line color, can be omitted

[ Top ]

rectangle   [line 507]

void rectangle( int $x0, int $y0, int $x1, int $y1, [mixed $fillColor = false], [mixed $lineColor = false])

Draw a rectangle

Overrides Image_Graph_Driver::rectangle() (Draw a rectangle)

Parameters:

int   $x0   —  X start point
int   $y0   —  X start point
int   $x1   —  X end point
int   $y1   —  Y end point
mixed   $fillColor   —  The fill color, can be omitted
mixed   $lineColor   —  The line color, can be omitted

[ Top ]

setFillImage   [line 348]

void setFillImage( string $filename)

Sets an image that should be used for filling

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

Parameters:

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

[ Top ]

setFont   [line 375]

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' = '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_Graph_Driver::setFont() (Sets the font options.)

Parameters:

array   $font   —  The font options.
   $fontOptions   — 

[ Top ]

setGradientFill   [line 357]

void setGradientFill( array $gradient)

Sets a gradient fill

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

Parameters:

array   $gradient   —  Gradient fill options

[ Top ]

splineEnd   [line 452]

void splineEnd( [bool $connectEnds = true], [mixed $fillColor = false], [mixed $lineColor = false])

Ends a spline

Overrides Image_Graph_Driver::splineEnd() (Draws a polygon)

Parameters:

bool   $connectEnds   —  Specifies whether the start point should be connected to the endpoint (closed polygon) or not (connected line)
mixed   $fillColor   —  The fill color, can be omitted
mixed   $lineColor   —  The line color, can be omitted

[ Top ]

startGroup   [line 715]

void startGroup( [string $name = false])

Start a group.

What this does, depends on the driver/format.


Overrides Image_Graph_Driver::startGroup() (Start a group.)

Parameters:

string   $name   —  The name of the group

[ Top ]

textHeight   [line 608]

int textHeight( string $text)

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

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

Parameters:

string   $text   —  The text to get the height of

[ Top ]

textWidth   [line 593]

int textWidth( string $text)

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

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

Parameters:

string   $text   —  The text to get the width of

[ Top ]

write   [line 626]

void write( int $x, int $y, string $text, int $alignment, [mixed $color = false])

Writes text

Overrides Image_Graph_Driver::write() (Writes text)

Parameters:

int   $x   —  X-point of text
int   $y   —  Y-point of text
string   $text   —  The text to write
int   $alignment   —  The alignment of the text
mixed   $color   —  The color of the text

[ Top ]


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