Login   Register  
PHP Classes

File: example1.php

Recommend this page to a friend!
Stumble It! Stumble It! Bookmark in del.icio.us Bookmark in del.icio.us
  Classes of Daniel Czuba  >  Image.class  >  example1.php  >  Download  
File: example1.php
Role: Example script
Content type: text/plain
Description: Example how to use this class
Class: Image.class
Generate images defined programmatically
Author: By
Last change:
Date: 4 years ago
Size: 600 bytes


Class file image Download
<?php // example1.php

require 'Image.class.php';

$image = new Image640480'123456' );
$image->setColor'004444' ); // every time you want to use 'new' color, you need to set it
$image->drawFilledRectangle28050600340 );
$image->setColor'aa3333' );
$image->drawFilledEllipse200210340440 );
$image->setColor'ff00ff' );
$image->drawRectangle340200400400 );
$image->setColor'ff00ff' );
$image->drawLineX40 );
$image->setColor'0aa0f0' );
$image->drawLineX60 );
$image->drawLineX61 );
$image->drawLineX62 );
$image->drawLineX63 );

$image->output'png' );