Macaulay2 » Documentation
Packages » VectorGraphics :: Path
next | previous | forward | backward | up | index | toc

Path -- An SVG path

Description

An SVG path. It follows the syntax of SVG paths, except successive commands must be grouped together in a list called PointList.

i1 : c=Circle{Radius=>0.1,"fill"=>"black"};
i2 : v1=gNode([0,0],c,Draggable=>true); v2=gNode([0,1],c,Draggable=>true); v3=gNode([2,1],c,Draggable=>true); v4=gNode([1,2],c,Draggable=>true);
i6 : gList(Path{{"M",v1,"C",v2,v3,v4}},v1,v2,v3,v4)

o6 = GraphicsList{cache => CacheTable{}                                                                                                                              }
                  Contents => {Path{cache => CacheTable{}                                                                                          }, v1, v2, v3, v4}
                                    PointList => {M, GraphicsCoordinate v1, C, GraphicsCoordinate v2, GraphicsCoordinate v3, GraphicsCoordinate v4}
                                    style => MutableHashTable{}
                  style => MutableHashTable{}

o6 : GraphicsList

For the programmer

The object Path is an instance of the type GraphicsType, with ancestor classes GraphicsPoly < GraphicsObject < GraphicsAncestor < HashTable < Thing.