PHP Class Grafika\Grafika

Datei anzeigen Open project: kosinix/grafika Class Usage Examples

Public Methods

Method Description
createBlankImage ( integer $width = 1, integer $height = 1 ) : grafika\ImageInterface Create a blank image.
createDrawingObject ( string $drawingObjectName ) : grafika\DrawingObjectInterface Draws an object. Detects available editor to use.
createEditor ( array $editorList = ['Imagick', 'Gd'] ) : grafika\EditorInterface Creates the first available editor.
createFilter ( string $filterName ) : grafika\FilterInterface Create a filter. Detects available editor to use.
createImage ( string $imageFile ) : grafika\ImageInterface Create an image.
detectAvailableEditor ( array $editorList = null ) : string Detects and return the name of the first supported editor which can either be "Imagick" or "Gd".
fontsDir ( ) : string Return path to directory containing fonts used in text operations.
setEditorList ( array $editorList ) Change the editor list order of evaluation globally.

Method Details

createBlankImage() public static method

Create a blank image.
public static createBlankImage ( integer $width = 1, integer $height = 1 ) : grafika\ImageInterface
$width integer Width of image in pixels.
$height integer Height of image in pixels.
return grafika\ImageInterface

createDrawingObject() public static method

Draws an object. Detects available editor to use.
public static createDrawingObject ( string $drawingObjectName ) : grafika\DrawingObjectInterface
$drawingObjectName string The name of the DrawingObject.
return grafika\DrawingObjectInterface

createEditor() public static method

Creates the first available editor.
public static createEditor ( array $editorList = ['Imagick', 'Gd'] ) : grafika\EditorInterface
$editorList array Array of editor list names. Use this to change the order of evaluation for editors. Default order of evaluation is Imagick then GD.
return grafika\EditorInterface

createFilter() public static method

Create a filter. Detects available editor to use.
public static createFilter ( string $filterName ) : grafika\FilterInterface
$filterName string The name of the filter.
return grafika\FilterInterface

createImage() public static method

Create an image.
public static createImage ( string $imageFile ) : grafika\ImageInterface
$imageFile string Path to image file.
return grafika\ImageInterface

detectAvailableEditor() public static method

Detects and return the name of the first supported editor which can either be "Imagick" or "Gd".
public static detectAvailableEditor ( array $editorList = null ) : string
$editorList array Array of editor list names. Use this to change the order of evaluation for editors for this function call only. Default order of evaluation is Imagick then GD.
return string Name of available editor.

fontsDir() public static method

Return path to directory containing fonts used in text operations.
public static fontsDir ( ) : string
return string

setEditorList() public static method

Change the editor list order of evaluation globally.
public static setEditorList ( array $editorList )
$editorList array