Polygon

The polygon render extension draws a filled (convex) polygon to the screen. This extension is only available when the polygon plugin has been loaded.

Polygon Render Extension Options

  • style - The style of polygon to render (string)

                            fill: draw a filled polygon using color attribute

                            line: draw a line using color attribute

                            lineloop: draw a line (with connected ends) in the using color attribute

                            filloutline: draw a filled polygon using color attribute, then outlined with outlinecolor attribute

  • antialias - whether to antialias the polygon (number)

                            0: do not antialias

                            1: antialias

    Single width outlined polygons are not anti-aliased on OpenGL ES 2.0 platforms. Pass the multisample option to the OpenGL ES 2.0 Storyboard runtime with 4x multisampling for anti-aliasing.

  • points - a list of points for the polygon (string)

                            List of points separated by a space.  Each point looks like:  x:y

  • color - The color used to stroke the polygon. (color)

  • outlinecolor - The color used to outline a filled polygon if the style is filloutline, this is currently a 1 pixel outline. (color)

  • linewidth - Thickens with which to draw the outline