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

Polygon -- An SVG polygon

Description

An SVG polygon. The coordinates must form a list called PointList. (the difference with Polyline is that the last coordinate is reconnected to the first)

i1 : Polygon{PointList=>{[0,10],[100,10],[90,90],[0,80]},"stroke"=>"red","fill"=>"white"}

o1 = Polygon{cache => CacheTable{}                                                                                                     }
             PointList => {GraphicsCoordinate |  0 |, GraphicsCoordinate | 100 |, GraphicsCoordinate | 90 |, GraphicsCoordinate |  0 |}
                                              | 10 |                     |  10 |                     | 90 |                     | 80 |
                                              |  0 |                     |  0  |                     |  0 |                     |  0 |
                                              |  1 |                     |  1  |                     |  1 |                     |  1 |
             style => MutableHashTable{...2...}

o1 : Polygon

For the programmer

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