[done][patch] Document Feature of point primitive for draw

Post any defects you find in the released or beta versions of the ImageMagick software here. Include the ImageMagick version, OS, and any command-line required to reproduce the problem. Got a patch for a bug? Post it here.
Post Reply
broucaries
Posts: 467
Joined: 2008-12-21T11:51:10-07:00

[done][patch] Document Feature of point primitive for draw

Post by broucaries »

According to documentation:

The shape primitives are drawn in the color specified in the preceding -fill option. For unfilled shapes, use -fill none. You can optionally control the stroke with the -stroke and -strokewidth options.
(see http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=322538)

If I type
convert -size 10x10 -fill red -stroke blue -draw "point 5,5" xc:white /tmp/output.xpm

the pixel is red ! Please document that point use fill or correct to use stroke

Regards

Bastien
Last edited by broucaries on 2009-01-18T07:40:54-07:00, edited 2 times in total.
User avatar
fmw42
Posts: 25562
Joined: 2007-07-02T17:14:51-07:00
Authentication code: 1152
Location: Sunnyvale, California, USA

Re: Bug or feature of point primitive for draw

Post by fmw42 »

broucaries wrote:According to documentation:

The shape primitives are drawn in the color specified in the preceding -fill option. For unfilled shapes, use -fill none. You can optionally control the stroke with the -stroke and -strokewidth options.
(see http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=322538)

If I type
convert -size 10x10 -fill red -stroke blue -draw "point 5,5" xc:white /tmp/output.xpm

the pixel is red ! Please document that point use fill or correct to use stroke

Regards

Bastien

Try using the IM v6 syntax.

convert input argument output

convert -size 10x10 xc:white -fill red -draw "point 5,5" /tmp/output.xpm

see
http://www.imagemagick.org/Usage/basics/#cmdline

also I don't believe that points have strokes
broucaries
Posts: 467
Joined: 2008-12-21T11:51:10-07:00

Re: Bug or feature of point primitive for draw

Post by broucaries »

fmw42 wrote:
broucaries wrote:According to documentation:

The shape primitives are drawn in the color specified in the preceding -fill option. For unfilled shapes, use -fill none. You can optionally control the stroke with the -stroke and -strokewidth options.
(see http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=322538)

If I type
convert -size 10x10 -fill red -stroke blue -draw "point 5,5" xc:white /tmp/output.xpm

the pixel is red ! Please document that point use fill or correct to use stroke

Regards

Bastien

Try using the IM v6 syntax.

convert input argument output

convert -size 10x10 xc:white -fill red -draw "point 5,5" /tmp/output.xpm

see
http://www.imagemagick.org/Usage/basics/#cmdline
Ok I do and it does not change
also I don't believe that points have strokes
Not sure in postscript point are drawn using degenerate path, and therefore are stroked. I suppose we should document that point are not stroked.

Regards

Bastien
broucaries
Posts: 467
Joined: 2008-12-21T11:51:10-07:00

Re: Bug or feature of point primitive for draw

Post by broucaries »

Hi,

That is the official imagemagick position about this. should I submit a documentation patch?

Regards
User avatar
anthony
Posts: 8883
Joined: 2004-05-31T19:27:03-07:00
Authentication code: 8675308
Location: Brisbane, Australia

Re: Bug or feature of point primitive for draw

Post by anthony »

At this time points are draw only using the fill color. Typically the stroke color is set to 'none' to turn it off.

However points are also not 'drawn' but are color replaced. They are NOT a normal Vector Graphic Language method, but a much lower level primative. As such stoke would not apply in any case.

I documented my finding about point in IM examples, and how it differs from the other color primatives.
http://www.imagemagick.org/Usage/draw/#color

If you want to properly 'draw' points you should also look at the points size and diameter, which means you really are drawing small circles, and not pixels!

See IM Examples on various techniques for circle and symbol drawing.
http://www.imagemagick.org/Usage/draw/#circles

I rather like the use of stroking a near zero-length line with round endcaps for this type of thing.

Code: Select all

  convert -size 100x60 xc:  -stroke Blue  -strokewidth 50 \
          -draw 'stroke-linecap round line 50,30 50,30.0001' \
          circle_line.gif
Anthony Thyssen -- Webmaster for ImageMagick Example Pages
https://imagemagick.org/Usage/
broucaries
Posts: 467
Joined: 2008-12-21T11:51:10-07:00

Re: Bug or feature of point primitive for draw

Post by broucaries »

So it is a feature.

Your documentation is really nice indeed :)

Patch the doc documenting the feature

http://bugs.debian.org/cgi-bin/bugrepor ... bug=322537

Regards
broucaries
Posts: 467
Joined: 2008-12-21T11:51:10-07:00

Re: [patch] Document Feature of point primitive for draw

Post by broucaries »

Fixed :)
Post Reply