mxGdCanvas.php | |
Variables | |
antialias | Specifies if image aspect should be preserved in drawImage. |
mxGdCanvas | Canvas for drawing graphs using the GD library. |
Variables | |
antialias | Specifies if antialiasing should be enabled. |
enableTtf | Specifies if truetype fonts are enabled if available. |
shadowColor | Holds the color object for the shadow color defined in mxConstants.W3C_SHADOWCOLOR. |
imageCache | Holds the image cache. |
image | Holds the image. |
height | Holds the height. |
Functions | |
mxGdCanvas | Constructs a new GD canvas. |
loadImage | Returns an image instance for the given URL. |
drawCell | Draws the given cell state. |
drawLabel | Draws the given label. |
drawMarker | Draws the specified marker. |
getImage | Returns an image that represents this canvas. |
setImage | Sets the image that represents the canvas. |
getImageForStyle | Returns an image that represents this canvas. |
drawLine | Draws the given line. |
drawShape | Draws the given shape. |
drawPolygon | Draws the given polygon. |
drawRect | Draws then given rectangle. |
drawOval | Draws then given ellipse. |
drawRhombus | Draws then given rhombus. |
drawTriangle | Draws then given triangle. |
drawHexagon | Draws then given haxagon. |
drawCylinder | Draws then given cylinder. |
drawCloud | Draws then given cloud. |
drawActor | Draws then given cloud. |
drawImage | Draws a given image. |
drawText | |
getTrueTypeFont | Returns the truetype font to be used to draw the text with the given style. |
getTrueTypeFontSize | Returns the truetype font size to be used to draw the text with the given style. |
drawTtfText | |
drawTtxTextLine | Draws a single line of the given true type font text. |
getFixedFontSize | Returns the fixed font size for GD (1 t0 5) for the given font properties |
drawString | |
drawFixedTextLine | Draws the given fixed text line. |
getColor | Allocates the given color and returns a reference to it. |
offset | Creates a new array of x, y sequences where the each coordinate is translated by dx and dy, respectively. |
destroy | Destroys all allocated resources. |
drawGraph | Draws the given graph using this canvas. |
Canvas for drawing graphs using the GD library. This class requires GD support (GDLib). Note that rounded corners, gradients and word wrapping are not supported by GD.
Variables | |
antialias | Specifies if antialiasing should be enabled. |
enableTtf | Specifies if truetype fonts are enabled if available. |
shadowColor | Holds the color object for the shadow color defined in mxConstants.W3C_SHADOWCOLOR. |
imageCache | Holds the image cache. |
image | Holds the image. |
height | Holds the height. |
Functions | |
mxGdCanvas | Constructs a new GD canvas. |
loadImage | Returns an image instance for the given URL. |
drawCell | Draws the given cell state. |
drawLabel | Draws the given label. |
drawMarker | Draws the specified marker. |
getImage | Returns an image that represents this canvas. |
setImage | Sets the image that represents the canvas. |
getImageForStyle | Returns an image that represents this canvas. |
drawLine | Draws the given line. |
drawShape | Draws the given shape. |
drawPolygon | Draws the given polygon. |
drawRect | Draws then given rectangle. |
drawOval | Draws then given ellipse. |
drawRhombus | Draws then given rhombus. |
drawTriangle | Draws then given triangle. |
drawHexagon | Draws then given haxagon. |
drawCylinder | Draws then given cylinder. |
drawCloud | Draws then given cloud. |
drawActor | Draws then given cloud. |
drawImage | Draws a given image. |
drawText | |
getTrueTypeFont | Returns the truetype font to be used to draw the text with the given style. |
getTrueTypeFontSize | Returns the truetype font size to be used to draw the text with the given style. |
drawTtfText | |
drawTtxTextLine | Draws a single line of the given true type font text. |
getFixedFontSize | Returns the fixed font size for GD (1 t0 5) for the given font properties |
drawString | |
drawFixedTextLine | Draws the given fixed text line. |
getColor | Allocates the given color and returns a reference to it. |
offset | Creates a new array of x, y sequences where the each coordinate is translated by dx and dy, respectively. |
destroy | Destroys all allocated resources. |
drawGraph | Draws the given graph using this canvas. |
var $enableTtf
Specifies if truetype fonts are enabled if available. Default is mxConstants.TTF_ENABLED.
var $shadowColor
Holds the color object for the shadow color defined in mxConstants.W3C_SHADOWCOLOR.
function mxGdCanvas( $width = 0, $height = 0, $scale = 1, $background = null, $imageBasePath = "" )
Constructs a new GD canvas. Use a HTML color definition for the optional background parameter, eg. white or #FFFFFF. The buffered image is only created if the given width and height are greater than 0.
Specifies if antialiasing should be enabled.
var $antialias
Specifies if truetype fonts are enabled if available.
var $enableTtf
Holds the color object for the shadow color defined in mxConstants.W3C_SHADOWCOLOR.
var $shadowColor
Defines the color to be used to draw shadows in DOM documents.
public static $W3C_SHADOWCOLOR
Holds the image cache.
var $imageCache
Holds the image.
var $image
Constructs a new GD canvas.
function mxGdCanvas( $width = 0, $height = 0, $scale = 1, $background = null, $imageBasePath = "" )
Returns an image instance for the given URL.
function loadImage( $image )
Draws the given cell state.
function drawCell( $state )
Draws the given label.
function drawLabel( $text, $state, $html = false )
Draws the specified marker.
function drawMarker( $type, $p0, $pe, $size, $stroke )
Returns an image that represents this canvas.
function getImage()
Sets the image that represents the canvas.
function setImage( $img )
Returns an image that represents this canvas.
function getImageForStyle( $style )
Draws the given line.
function drawLine( $x0, $y0, $x1, $y1, $stroke = null, $dashed = false )
Draws the given shape.
function drawShape( $x, $y, $w, $h, $style )
Draws the given polygon.
function drawPolygon( $points, $fill = null, $stroke = null, $shadow = false )
Draws then given rectangle.
function drawRect( $x, $y, $w, $h, $fill = null, $stroke = null, $shadow = false, $rounded = false, $dashed = false )
Draws then given ellipse.
function drawOval( $x, $y, $w, $h, $fill = null, $stroke = null, $shadow = false )
Draws then given rhombus.
function drawRhombus( $x, $y, $w, $h, $fill = null, $stroke = null, $shadow = false )
Draws then given triangle.
function drawTriangle( $x, $y, $w, $h, $fill = null, $stroke = null, $shadow = false, $direction = null )
Draws then given haxagon.
function drawHexagon( $x, $y, $w, $h, $fill = null, $stroke = null, $shadow = false, $direction = null )
Draws then given cylinder.
function drawCylinder( $x, $y, $w, $h, $fill = null, $stroke = null, $shadow = false )
Draws then given cloud.
function drawCloud( $x, $y, $w, $h, $fill = null, $stroke = null, $shadow = false )
Draws then given cloud.
function drawActor( $x, $y, $w, $h, $fill = null, $stroke = null, $shadow = false )
Draws a given image.
function drawImage( $x, $y, $w, $h, $image, $aspect = true, $flipH = false, $flipV = false )
function drawText( $string, $x, $y, $w, $h, $style )
Returns the truetype font to be used to draw the text with the given style.
function getTrueTypeFont( $style )
Returns the truetype font size to be used to draw the text with the given style.
function getTrueTypeFontSize( $style )
function drawTtfText( $string, $x, $y, $w, $h, $style )
Returns the fixed font size for GD (1 t0 5) for the given font properties
function getFixedFontSize( $fontSize, $fontFamily, $fontStyle = null )
Draws the given fixed text line.
function drawFixedTextLine( $text, $font, $left, $top, $color, $horizontal = true )
Allocates the given color and returns a reference to it.
function getColor( $hex, $default = null )
Creates a new array of x, y sequences where the each coordinate is translated by dx and dy, respectively.
function offset( $points, $dx = null, $dy = null )
Destroys all allocated resources.
function destroy()
Draws the given graph using this canvas.
public static function drawGraph( $graph, $clip = null, $bg = null )
Whether TrueType fonts should be enabled in the mxGdCanvas by default.
public static $TTF_ENABLED