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: 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: 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)
  • Re: Displaying images on form...
    ... The circle is way too small and placed somewhere bottom right on the ... the aspect ratio of the Form, so it should result in a circular shape, at ... because Windows uses the same number of "pixels per logical inch" for both ... the pixels themselves are not necessarily "square" when measured ...
    (microsoft.public.vb.general.discussion)
  • Re: Drawing Arcs
    ... fast (28 cycles for a normal 131 pixels screen) that it costs less ... So it seems that the header does actually cost a fixed 20ms time, ... I believe this is the last release for full circle drawing, ... both for Arcs & Circles. ...
    (comp.sys.hp48)