How to create a 3D rectangle

PerlMagick is an object-oriented Perl interface to ImageMagick. Use this forum to discuss, make suggestions about, or report bugs concerning PerlMagick.
Posts: 14
Joined: 2014-02-28T00:30:49-07:00
Authentication code: 6789

How to create a 3D rectangle

Post by mc_hendriks »

I would like to create a 3D looking rectangle or a rectangle with a gradient.
I cannot figure out how. Any help or pointing in the right direction would be appreciated.
I'm using the following perl script.

Code: Select all

use Image::Magick;

$image = Image::Magick->new;		# create new image
$image->Set(size=>"555x802");       # set image size
$image->ReadImage("xc:white");   # white background
$image->Draw(primitive=>'RoundRectangle',fill=>'blue',points=>'30,30,400,100 10,10');    # draw a rounded rectangle fill it with blue
$image->Write(filename=>"image2.png", compress=>"None");   # write image to file
exit 1;			# done
Is it possible to combine it with the Draw?
I would like to realize it from perl and not from the commandline.