PHP Classes

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: 8 months ago
Size: 634 bytes


Class file image Download


> Figure class allows to create rectangles or ellipses.

The following example creates an rectangle, set an opacity (75%) and save it as PNG:


use GImage\Figure;

$rectangle = new Figure(400, 250);
    ->setBackgroundColor(0, 0, 255)

As above example, we can also create an ellipse:


use GImage\Figure;

$ellipse = new Figure(300, 300);
    ->setBackgroundColor(255, 0, 0)