Location: PHPKode > scripts > Image.class > image-class-0-1/example1.php
<?php // example1.php

require 'Image.class.php';

$image = new Image( 640, 480, '123456' );
$image->setColor( '004444' ); // every time you want to use 'new' color, you need to set it
$image->drawFilledRectangle( 280, 50, 600, 340 );
$image->setColor( 'aa3333' );
$image->drawFilledEllipse( 200, 210, 340, 440 );
$image->setColor( 'ff00ff' );
$image->drawRectangle( 340, 200, 400, 400 );
$image->setColor( 'ff00ff' );
$image->drawLineX( 40 );
$image->setColor( '0aa0f0' );
$image->drawLineX( 60 );
$image->drawLineX( 61 );
$image->drawLineX( 62 );
$image->drawLineX( 63 );

$image->output( 'png' );
Return current item: Image.class