PHP Class Grafika\Grafika

Afficher le fichier Open project: kosinix/grafika Class Usage Examples

Méthodes publiques

Méthode 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 méthode

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.
Résultat grafika\ImageInterface

createDrawingObject() public static méthode

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

createEditor() public static méthode

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.
Résultat grafika\EditorInterface

createFilter() public static méthode

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

createImage() public static méthode

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

detectAvailableEditor() public static méthode

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.
Résultat string Name of available editor.

fontsDir() public static méthode

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

setEditorList() public static méthode

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