next | previous | forward | backward | up | top | index | toc | Macaulay2 website
Graphics :: svgObject(Picture)

svgObject(Picture) -- create a string describing the picture in SVG

Synopsis

Description

i1 : myfgp1=formatGraphicPrimitives({point(20.,30.),point(30.,40.)},hashTable {"fill"=>"black"})

o1 = FormattedGraphicPrimitives{{Point2D{20, 30}, Point2D{30, 40}}, HashTable{fill => black}}

o1 : FormattedGraphicPrimitives
i2 : myfgp2=formatGraphicPrimitives({circle(point(20.,30.),10)},hashTable {"fill"=>"red"})

o2 = FormattedGraphicPrimitives{{Circle{Point2D{20, 30}, 10}}, HashTable{fill => red}}

o2 : FormattedGraphicPrimitives
i3 : mypict=picture({myfgp1,myfgp2})

o3 = Picture{FormattedGraphicPrimitives{{Point2D{20, 30}, Point2D{30, 40}}, HashTable{fill => black}}, FormattedGraphicPrimitives{{Circle{Point2D{20, 30}, 10}}, HashTable{fill => red}}}

o3 : Picture
i4 : svgObject(mypict)

o4 = <circle cx="20" cy="30 r="2" stroke="black" fill-opacity="1" stroke-width="0" fill="black" stroke-opacity="1" />

     <circle cx="30" cy="40 r="2" stroke="black" fill-opacity="1" stroke-width="0" fill="black" stroke-opacity="1" />

     <circle cx="20" cy="30" r="10" stroke="black" fill-opacity="0" stroke-width="1" fill="red" stroke-opacity="1" />

See also