next | previous | forward | backward | up | top | index | toc | Macaulay2 website
VectorGraphics :: Line

Line -- An SVG line

Description

A simple SVG line. The two compulsory options are Point1 and Point2, which are vectors (or sequences) describing the two endpoints.

i1 : Line{Point1=>vector{0,0},Point2=>vector{2,1},"stroke"=>"green"}

o1 = Line{cache => CacheTable{}}
          Point1 => | 0 |
                    | 0 |
                    | 0 |
                    | 1 |
          Point2 => | 2 |
                    | 1 |
                    | 0 |
                    | 1 |
          stroke => green

o1 : Line
i2 : Line{(0,0),(2,1),"stroke-width"=>0.1} -- simplified syntax

o2 = Line{cache => CacheTable{}}
          Point1 => | 0 |
                    | 0 |
                    | 0 |
                    | 1 |
          Point2 => | 2 |
                    | 1 |
                    | 0 |
                    | 1 |
          stroke-width => .1

o2 : Line

For the programmer

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