Stroke primitive in MVG file ignored by convert

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
rmagick
Posts: 245
Joined: 2006-03-16T17:30:48-07:00
Location: Durham, NC, USA

Stroke primitive in MVG file ignored by convert

Post by rmagick »

This is Version: ImageMagick 6.4.1 05/12/08 Q8. The following MVG file and convert command:

Code: Select all

push defs
push pattern xxxxx 0 0 16 16
push graphic-context
stroke "none"
fill "DarkBlue"
rectangle 0,0 16,16
fill "yellow"
stroke "red"
polygon 0,0,8,16,16,0,0,0
pop graphic-context
pop pattern
pop defs
fill "xxxxx"
stroke "blue"
stroke-width 5
path 'M50,50 Q-30,100 50,150 100,230 150,150 230,100 150,50 100,-30 50,50'

Code: Select all

convert -size 300x300 pattern.mvg test.jpg
produces the image below. I expect to see a 5-pixel wide blue stroke around the diamond shape. I think this is a bug but please tell me if I've miscoded the MVG primitives. Thanks!

Image
User avatar
fmw42
Posts: 25562
Joined: 2007-07-02T17:14:51-07:00
Authentication code: 1152
Location: Sunnyvale, California, USA

Re: Stroke primitive in MVG file ignored by convert

Post by fmw42 »

I am no expert on using MVG in this way, but what is fill "xxxxx"? Does it not need a color?
rmagick
Posts: 245
Joined: 2006-03-16T17:30:48-07:00
Location: Durham, NC, USA

Re: Stroke primitive in MVG file ignored by convert

Post by rmagick »

"xxxxx" is the name of the pattern to be used as a fill. Notice that the pattern definition precedes its actual use.
User avatar
anthony
Posts: 8883
Joined: 2004-05-31T19:27:03-07:00
Authentication code: 8675308
Location: Brisbane, Australia

Re: Stroke primitive in MVG file ignored by convert

Post by anthony »

Have you tryed this without a pattern... Does that work?
EG can you simplify the problem, or does the problem only exist when you use a MVG pattern.

From what I can see it should have a blue stroke around the pattern, But then I have not used MVG with SVG like internally defined patterns.
Anthony Thyssen -- Webmaster for ImageMagick Example Pages
https://imagemagick.org/Usage/
rmagick
Posts: 245
Joined: 2006-03-16T17:30:48-07:00
Location: Durham, NC, USA

Re: Stroke primitive in MVG file ignored by convert

Post by rmagick »

Without a pattern it works fine. However, the bug report I got says that the reverse situation, with a pattern stroke and solid fill, also fails.
rmagick
Posts: 245
Joined: 2006-03-16T17:30:48-07:00
Location: Durham, NC, USA

Re: Stroke primitive in MVG file ignored by convert

Post by rmagick »

I don't want this report to get lost in the shuffle, so I tried reversing the stroke and fill so that the stroke pattern is "xxxxx" and the fill is "blue". This works. Also the simple case that uses no patterns at all, just solid colors, works correctly. So apparently the only test that fails is the one I submitted to begin with: when the fill is a pattern and the stroke is a solid color.

I tested with 6.4.2-1.
User avatar
magick
Site Admin
Posts: 11064
Joined: 2003-05-31T11:32:55-07:00

Re: Stroke primitive in MVG file ignored by convert

Post by magick »

We have added this bug to our list and will investigate. We currently do not have an ETA on a fix. Stand by...
rmagick
Posts: 245
Joined: 2006-03-16T17:30:48-07:00
Location: Durham, NC, USA

Re: Stroke primitive in MVG file ignored by convert

Post by rmagick »

Thanks! I appreciate your efforts.
Post Reply