Page 1 of 1

Stroking and filling text with a pattern in MVG

Posted: 2009-01-26T16:48:35-07:00
by rmagick
An RMagick user reports a problem rendering text using a solid color stroke of width 3 and a pattern fill. I've reproduced it using just MVG and convert. Notice that the stroke does not appear on some letters in the bottom row of text. I'm not using my regular machine tonight so my IM install is a bit back-level. I did this using 6.4.8-1 on OS X 10.5.6. This problem may be related to this one: viewtopic.php?f=3&t=11628. Please let me know if you need any more information.

Code: Select all

$ convert -background transparent -size 750x300 test.mvg test_gradstroke.png
Image

Here's the gradfill.miff image used in the pattern: http://home.roadrunner.com/~foxhunter/gradfill.miff
Here's the test.mvg file itself:

Code: Select all

font-size 15
stroke "transparent"
fill "black"
text 0,15 'stroke color=yellow, width=3 and fill=red'
text 0,100 'stroke color=yellow, width=2 and fill_pattern=gradient'
text 0,200 'ERROR - stroke color=yellow, width=3 and fill_pattern=gradient'
font-size 65
stroke "yellow"
stroke-width 3
fill "red"
text 0,85 'E'
text 40,85 'n'
text 80,85 'd'
text 120,85 '-'
text 160,85 'Á'
text 200,85 'É'
text 240,85 'Í'
text 265,85 'Ó'
text 320,85 '-'
text 360,85 'E'
text 400,85 'n'
text 440,85 'd'
font-size 65
stroke "yellow"
stroke-width 2
push defs
push pattern gradient 0 0 750 300
push graphic-context
image Over 0,0,0,0 'gradfill.miff'
pop graphic-context
pop pattern
pop defs
fill "gradient"
text 0,170 'E'
text 40,170 'n'
text 80,170 'd'
text 120,170 '-'
text 160,170 'Á'
text 200,170 'É'
text 240,170 'Í'
text 265,170 'Ó'
text 320,170 '-'
text 360,170 'E'
text 400,170 'n'
text 440,170 'd'
font-size 65
stroke "yellow"
stroke-width 3
fill "gradient"
text 0,270 'E'
text 40,270 'n'
text 80,270 'd'
text 120,270 '-'
text 160,270 'Á'
text 200,270 'É'
text 240,270 'Í'
text 265,270 'Ó'
text 320,270 '-'
text 360,270 'E'
text 400,270 'n'
text 440,270 'd'

Re: Stroking and filling text with a pattern in MVG

Posted: 2009-01-30T11:38:27-07:00
by magick
The problem you reported is fixed in ImageMagick 6.4.9-0 Beta available sometime tomorrow. Thanks.

Re: Stroking and filling text with a pattern in MVG

Posted: 2009-01-31T14:02:47-07:00
by rmagick
I installed the beta and now the test produces the expected output. I passed along the good news to the RMagick user. Thanks for the quick turnaround!