Simple GD Graphics |
| sample code |
use GD::Simple;
# create a new image
$img = GD::Simple->new(100,100);
# draw a red rectangle with blue borders
$img->bgcolor('red');
$img->fgcolor('blue');
$img->rectangle(10,10,50,50);
print $img->png;
|
| GD::Simple |
![]() |
| sample code |
use GD::Simple;
# create a new image
$img = GD::Simple->new(300,100);
# draw a string at (5,50)
$img->moveTo(5,50);
$img->font(gdGiantFont);
$img->fgcolor('blue');
$img->string('A simple line.');
print $img->png;
# gdGiantFont, gdLargeFont, gdMediumBoldFont, gdSmallFont, gdTinyFont
|
| GD::Simple |
![]() |
| Defined GD:Simple colors name |
![]() |
goto [Course index] [Section index] [Next] Dr Jaime Prilusky, course@weizmann.ac.il. |