[magick-users] How to draw a transparent rectangle on top of a line using PerlMagick and output to a .bmp file
Anthony Thyssen
anthony at griffith.edu.au
Sun Nov 2 16:32:02 PST 2008
Fred Weinhaus on wrote...
|
| I know nothing about PerlMagic, but why don't you reverse the process
| and draw the green rectangle first and then draw the black line on
| top of it.
|
|
|
|
| >Hi,
| >
| > I am using Perl ImageMagick. I first draw a black line using Draw
| >method. Then I set the green to be transparent using,
| >
| > $image->Transparent(color=>'green');
| >
| > Then I Draw a green rectangle on top of the line. But the line
| >cannot be seen, which means the green rectangle is not transparent. Can
| >anyone help?
| >
| >
| >
| >Min
| >
Just making a specific color transparent is NOT recommended, as in
generally a color will have anti-aliased edges or other problems.
However for a green rectangle, there should be no problems, if you had
used intergers for the retangles pleacement.
As for the actual problem the others are right. do the transparency
first, then draw the lines over that.
Anthony Thyssen ( System Programmer ) <A.Thyssen at griffith.edu.au>
-----------------------------------------------------------------------------
I really hate this damn machine,
I wish that they would sell it.
It never does quite what I want,
Only what I tell it.
-----------------------------------------------------------------------------
Anthony's Home is his Castle http://www.cit.gu.edu.au/~anthony/
More information about the Magick-users
mailing list