The polygon render extension draws a filled (convex) polygon to the screen. This extension is only available when the polygon plugin has been loaded. Thedemonstrates how to use a polygon with dynamic point generation to render a trend graph.
The polygon render extension uses many standard options but also includes:
a list of points for the polygon (string). The list of points are x,y values that are space separated, for example: 10,20 5,5 0,0.
The style of polygon to render (string). The style corresponds to one of the following values:
Draw a dashed line using Fill (color) and Dash Pattern attributes
Draw a filled polygon using Fill (color) attribute
Fill & Stroke ("filloutline")
Draw a filled polygon using Fill (color) attribute, then outlined with Outline (color) attribute
Draw a line using Fill (color) attribute
Draw a line (with connected ends) using Fill (color) attribute
- Line Width ("linewidth")
Changes width of the outline (stroke) drawn (number)
- Dash Pattern ("dash")
Defines the dash size and the space size between each dash, only used with "dash" style (string). For example a long line short space might look like "10 5 10 5"
- Anti-alias ("antialias")
Indicates if the polygon line drawn should be anti-aliased (1) or not (0). Single width outlined polygons are not anti-aliased on OpenGL ES 2.0 platforms. The
multisampleoption for the OpenGL ES 2.0 Storyboard runtime controls polygon anti-aliasing.
- Fill ("color")
The color used to fill the polygon.
- Outline ("outlinecolor")
The color used to outline (stroke) a filled polygon i.e. if the style is Fill & Stroke