Macaulay2 » Documentation
Packages » Graphics :: pgfObject(Polygon2D,HashTable)
next | previous | forward | backward | up | index | toc

# pgfObject(Polygon2D,HashTable) -- create the string describing a circle in pgf

- Function: pgfObject
- Usage:
    `svgObject(mypolygon,myoptions)`
- Inputs:
  - mypolygon, an instance of the type Polygon2D,
  - myoptions, a hash table, giving values to some options
- Outputs:
  - a string, containing the description of the polygon in pgf

## Description

The options that are not given in myoptions are set at their default values if they are contained in defaultPGFOptions. Options not listed in possiblePGFOptions are discarded.

    i1 : myoptions = hashTable {"fill"=>"black"}

    o1 = HashTable{"fill" => black}

    o1 : HashTable

    i2 : pgfObject(polygon({point(20,30),point(40,50),point(10,40)}),myoptions)

    o2 = \draw[fill opacity=1,fill=black] (20,30) -- (40,50) -- (10,40) -- cycle;

## Ways to use this method:

- pgfObject(Polygon2D,HashTable) -- create the string describing a circle in pgf

The source of this document is in /build/macaulay2-88fgJW/macaulay2-1.25.11+ds/M2/Macaulay2/packages/Graphics.m2:1737:0.