Re: use perl to draw Venn Diagram



"Ela" <ela@xxxxxxxxxx> writes:

Thanks a lot, Gunnar Hjalmarsson. But the doc and google search don't tell
me how to use gdstyled and gdbrushed to draw a circle with a dashed/dotted
line.

The following is copied directly from the getStyle section of the GD
docs at <http://search.cpan.org/~lds/GD-2.39/GD.pm>:

# Set a style consisting of 4 pixels of yellow,
# 4 pixels of blue, and a 2 pixel gap
$myImage->setStyle($yellow,$yellow,$yellow,$yellow,
$blue,$blue,$blue,$blue,
gdTransparent,gdTransparent);
$myImage->arc(50,50,25,25,0,360,gdStyled);

You could probably also use brushes instead. Anyway all the
information is really there in the docs. If you're unable to create a
working script from that, you may want to post at least what you've
got now and what you're having difficulty with *exactly*. Just
claiming GD doesn't do what you want when it clearly does and even
provide examples in the docs isn't helping.

Take some time to read the full manpage linked above, it's not that
big and you should be able to figure it out yourself.

--
Joost Diepenmaat | blog: http://joost.zeekat.nl/ | work: http://zeekat.nl/
.



Relevant Pages

  • Re: experimental brightness and discrimination-image processing
    ... I need to draw a big square image 256x256 pixels and fill it with constant grey level 'I'. ... secondly, draw a circle, radius is 16 pixels. ...
    (comp.soft-sys.matlab)
  • Re: circles
    ... I've played with the method you use (draw line from center ... of circle to every arc coordinate)... ... the two lines above share pixels, ... the closer to the center of the circle you get. ...
    (comp.sys.apple2.programmer)
  • Re: experimental brightness and discrimination-image processing
    ... I need to draw a big square image 256x256 pixels and fill it with constant grey level 'I'. ... secondly, draw a circle, radius is 16 pixels. ...
    (comp.soft-sys.matlab)
  • Re: BENQ TFT MONITORS - Thanks for the help
    ... Everything is vertically compressed to cram in more lines. ... > draw a circle, it will appear as an oval. ... > play a game designed for square pixels, people will appear short and fat. ...
    (alt.os.linux.suse)
  • Re: Linux gForth/VFX windows
    ... horizontal nib (3 pixels) ... Draw a circle segment. ... These are hardware coordinates. ... In graphics mode EMIT, TYPE etcetera still work, but now they ...
    (comp.lang.forth)