ImageMagick can produce MVG from SVG for those SVG graphic elements ImageMagick supports. For your example, type
convert msvg:opacity01.svg opacity01.mvg
You now have the MVG required to produce the image:
Code: Select all
push graphic-context
viewbox 0 0 340 99
affine 0.283333 0 0 0.282857 0.0 0.0
#
# Example opacity01 - opacity property
push graphic-context
fill 'none'
stroke 'blue'
rectangle 1,1 1199,349
pop graphic-context
push graphic-context
fill '#0000ff'
rectangle 100,100 1100,250
pop graphic-context
push graphic-context
fill 'red'
opacity '1'
circle 200,100 200,150
pop graphic-context
push graphic-context
fill 'red'
opacity '.8'
circle 400,100 400,150
pop graphic-context
push graphic-context
fill 'red'
opacity '.6'
circle 600,100 600,150
pop graphic-context
push graphic-context
fill 'red'
opacity '.4'
circle 800,100 800,150
pop graphic-context
push graphic-context
fill 'red'
opacity '.2'
circle 1000,100 1000,150
pop graphic-context
push graphic-context
opacity '1'
push graphic-context
fill 'red'
opacity '1'
circle 182.5,250 182.5,300
pop graphic-context
push graphic-context
fill 'green'
opacity '1'
circle 217.5,250 217.5,300
pop graphic-context
pop graphic-context
push graphic-context
opacity '.5'
push graphic-context
fill 'red'
opacity '1'
circle 382.5,250 382.5,300
pop graphic-context
push graphic-context
fill 'green'
opacity '1'
circle 417.5,250 417.5,300
pop graphic-context
pop graphic-context
push graphic-context
opacity '1'
push graphic-context
fill 'red'
opacity '.5'
circle 582.5,250 582.5,300
pop graphic-context
push graphic-context
fill 'green'
opacity '.5'
circle 617.5,250 617.5,300
pop graphic-context
pop graphic-context
push graphic-context
opacity '1'
push graphic-context
fill 'green'
opacity '.5'
circle 817.5,250 817.5,300
pop graphic-context
push graphic-context
fill 'red'
opacity '.5'
circle 782.5,250 782.5,300
pop graphic-context
pop graphic-context
push graphic-context
opacity '.5'
push graphic-context
fill 'red'
opacity '.5'
circle 982.5,250 982.5,300
pop graphic-context
push graphic-context
fill 'green'
opacity '.5'
circle 1017.5,250 1017.5,300
pop graphic-context
pop graphic-context
pop graphic-context