How to create a 3D rectangle
Posted: 2015-05-24T05:17:59-07:00
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.
Is it possible to combine it with the Draw?
I would like to realize it from perl and not from the commandline.
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
#!/usr/bin/perl
use Image::Magick;
$image = Image::Magick->new; # create new image
$image->Set(size=>"555x802"); # set image size
$image->Set(density=>"100x100");
$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
I would like to realize it from perl and not from the commandline.