public
Jaguar\CanvasInterface
|
#
setHandler( resource $handler )
Set canvas handler
Parameters
- $handler
resource $handler gd resource
Returns
Throws
InvalidArgumentException
|
public
resource
|
#
getHandler( )
Get canvas handler
Returns
resource gd resource
|
public
boolean
|
#
isHandlerSet( )
Check if the handler is empty
Check if the handler is empty
Returns
boolean
|
public
integer
|
#
getWidth( )
Get canvas width
Returns
integer
|
public
integer
|
#
getHeight( )
Get height
Returns
integer
|
public
Jaguar\Dimension
|
#
getDimension( )
Get canvas dimension
Returns
|
public
boolean
|
#
isTrueColor( )
Check if the canvas represents a truecolor canvas
Check if the canvas represents a truecolor canvas
Returns
boolean true if true color false otherwise
Throws
|
public
Jaguar\CanvasInterface
|
#
alphaBlending( boolean $bool )
Set alpha blending
Parameters
- $bool
boolean $bool default true
Returns
Throws
|
public
Jaguar\CanvasInterface
|
#
getCopy( )
Get Copy of the current canvas
Get Copy of the current canvas
Returns
Throws
|
public
Jaguar\CanvasInterface
|
#
create( Jaguar\Dimension $dimension )
Create canvas (true colors only)
Create canvas (true colors only)
Parameters
Returns
Throws
|
public
Jaguar\CanvasInterface
|
#
fromFile( string $file )
Create new canvas from file
Create new canvas from file
Parameters
Returns
Throws
|
public
Jaguar\CanvasInterface
|
#
fromString( string $string )
Create new canvas representing the canvas obtained from the given string
Create new canvas representing the canvas obtained from the given string
Note : the current canvas handler will be destroy before creating the
new one and you have no more access for it
Parameters
- $string
string $string canvas as string
Returns
Throws
|
public
Jaguar\CanvasInterface
|
#
fromCanvas( Jaguar\CanvasInterface $canvas )
Replace this canvas handler with a new one loaded from another canvas
Replace this canvas handler with a new one loaded from another canvas
Note :
note that the current canvas handler will be destroyed before assigning the
new one.
This behaviour will not allow to create canvas and depend on php garbage
collection to clean it
Parameters
Returns
Throws
|
public
Jaguar\Drawable\Pixel
|
#
getPixel( Jaguar\Coordinate $coordinate )
Get Pixel at specific coordinate
Get Pixel at specific coordinate
Parameters
- $coordinate
Jaguar\Coordinatee $coordinate
Returns
Throws
|
public
integer
|
#
getColorAt( Jaguar\Coordinate $coordinate )
Get color at specific coordinate
Get color at specific coordinate
Parameters
- $coordinate
Jaguar\Coordinatee $coordinate
Returns
integer
Throws
|
public
Jaguar\CanvasInterface
|
#
draw( Jaguar\Drawable\DrawableInterface $drawable, mixed $style = null )
Draw drawable object on the current canvas
Draw drawable object on the current canvas
Parameters
Returns
Throws
|
public
Jaguar\CanvasInterface
|
#
paste( Jaguar\CanvasInterface $src, Jaguar\Box $srcBox = null, Jaguar\Box $destBox = null )
Merge two canvas together
Merge two canvas together
Note :
if $srcBox</t> or $destBox is null then a new box object
will be created its dimension equlas the $src dimension and at (0,0)
coordinate
Parameters
Returns
Throws
|
public
Jaguar\CanvasInterface
|
|
public
Jaguar\CanvasInterface
|
#
save( string $path = null )
Save canvas
Parameters
- $path
string $path The path to save the canvas to. If not set or NULL, the raw canvas stream
will be outputted directly.
Returns
Throws
|
public
Jaguar\CanvasInterface
|
#
destroy( )
Destroy the canvas
destroy the canvas handler
Returns
Throws
|
public
string
|
#
__toString( )
Get a string representation of the current canvas object
Get a string representation of the current canvas object
Returns
string
|