Page 1 of 1

Gradients in MVG, does not obey geometry

Posted: 2010-11-29T18:20:26-07:00
by anthony
I have been playing with MVG gradients.

Code: Select all

viewbox 0 0 320 100
translate 30 50

push defs
push gradient 'bar_gradient' linear 0,-32 0,32
stop-color 'rgb(0,255,0)' 0%
stop-color 'rgb(0,128,0)' 100%
pop gradient
pop defs

push graphic-context
fill 'url(#bar_gradient)' stroke black stroke-width 1
roundrectangle -16,-32 146,32 16,32
pop graphic-context
It you give this to convert
convert gradient_test.mvg show:

The result is that the gradient does not obey the translation or its internal offsets!
The vertical length of the gradient is obeyed, but the top (0% stop) is pegged to the top of the drawing space.
It does not obey either the 'start point' specified or the translation of the coordinate system.

Re: Gradients in MVG, does not obey geometry

Posted: 2010-11-29T18:36:12-07:00
by anthony
In similar way only the last two 'colors' are actually used.

that is substituting this into the above only produces a green to black gradient!!!

Code: Select all

push gradient 'bar_gradient' linear 0,0 0,100
stop-color 'white' 0%
stop-color 'lime' 30%
stop-color 'green' 60%
stop-color 'black' 100%
I though gradient had been improved in MVG! with expansion of the stop colors.