-draw path ML misses lines

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
snibgo
Posts: 12159
Joined: 2010-01-23T23:01:33-07:00
Authentication code: 1151
Location: England, UK

-draw path ML misses lines

Post by snibgo »

The following correctly draws three lines that don't have overlapping ends:

Code: Select all

%IM%convert -size 200x100 xc: -stroke #000 -fill None ^
  -draw "path 'M0,0 L99,0  M99,1 L0,98  M0,99 L199,99'" ^
  linesBug0.png
Image

But when I adjust the coordinates of the middle line, so the first and second end where the next line starts, it draws only one line:

Code: Select all

%IM%convert -size 200x100 xc: -stroke #000 -fill None ^
  -draw "path 'M0,0 L99,0  M99,0 L0,99  M0,99 L199,99'" ^
  linesBug1.png
Image

A workaround is to draw the lines in a different order:

Code: Select all

%IM%convert -size 200x100 xc: -stroke #000 -fill None ^
  -draw "path 'M99,0 L0,99  M0,0 L99,0  M0,99 L199,99'" ^
  linesBug2.png
Image

This seems to be a generic problem: when one line ends where the next starts, the second line is not drawn.

Tested with v6.9.0-0 under Windows 8.1.
snibgo's IM pages: im.snibgo.com
User avatar
fmw42
Posts: 25562
Joined: 2007-07-02T17:14:51-07:00
Authentication code: 1152
Location: Sunnyvale, California, USA

Re: -draw path ML misses lines

Post by fmw42 »

I can confirm the same results on Mac OSX Snow Leopard and IM 6.9.0.5 Q16
Post Reply