<?php
$move = 30;
$image = new Imagick();
$image->newimage(450,130, "#cc9999");
$image->setimageformat( "png" );
# define some color objects
$none = new imagickpixel( "transparent" );
$red = new imagickpixel( "red" );
$blue = new imagickpixel( "#0000ff" );
$green = new imagickpixel( "green" );
$yellow = new imagickpixel( "yellow" );
$purple = new imagickpixel( "purple" );
# define a line
$line = new ImagickDraw;
$line->setfillcolor($blue);
$line->line( 20,20, 420, 40);
# draw the line
$image->drawimage($line);
# change the lines color
$line->setfillcolor($green);
# and the stroke color
$line->setstrokecolor($green);
# Make it wider
$line->setstrokewidth(20);
# Gve it a round end
$line->setStrokeLineCap(imagick::LINECAP_ROUND);
# Move it over
$line->line( 20,50, 420, 70);
# Draw the line
$image->drawimage($line);
# make dash array
$dash = array( 2,2,4 );
# set dash pattern
$line->setStrokeDashArray( $dash );
# make fill color transparent
$line->setfillcolor($none);
# set stroke color purple
$line->setstrokecolor($purple);
$line->setStrokeLineCap( imagick::LINECAP_BUTT );
$line->line( 20,80, 420, 100);
$image->drawimage($line);
# make a new draw object
$line_2 = new ImagickDraw;
$line_2->setfillcolor($yellow);
$line_2->setstrokecolor($yellow);
$line_2->setstrokewidth(20);
# make it simitransparent with setFillOpacity and setStrokeAlpha
$line_2->setFillOpacity(.75);
$line_2->setStrokeAlpha(.3);
$line_2->line( 400,20, 40, 100);
$image->drawimage($line_2);
# send to bowser
header("Content-type: image/png");
echo $image;
?>