File: docs/classes/

Recommend this page to a friend!
  Classes of Jose Luis Quintana  >  GImage  >  docs/classes/  >  Download  
File: docs/classes/
Role: Example script
Content type: text/markdown
Description: Example script
Class: GImage
Create graphic images with a fluent interface
Author: By
Last change:
Date: 2 years ago
Size: 783 bytes


Class file image Download


> Text class allows to use text to be embedded into Canvas.

Example below creates a text with opacity using a custom TTF font:

!!! tip "Tip"

Using `setWidth()` or `setHeight()` methods we can control the width and height of the text on canvas.


$text = new Text('My ustom text with opacity!');
    ->setColor(255, 255, 255)

// Used as layout
$layout = new Figure(350, 180);
    ->setBackgroundColor(300, 300, 300)

$canvas = new Canvas($layout);

For more information send a message to info at phpclasses dot org.