Gradients in MVG, does not obey geometry
Posted: 2010-11-29T18:20:26-07:00
I have been playing with MVG gradients.
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.
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
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.