Class: GraphicsData

Tiny. GraphicsData

A GraphicsData object.

new Tiny.GraphicsData(lineWidth, lineColor, lineAlpha, fillColor, fillAlpha, fill, nativeLines, shape, lineAlignment)

Name Type Description
lineWidth number

the width of the line to draw

lineColor number

the color of the line to draw

lineAlpha number

the alpha of the line to draw

fillColor number

the color of the fill

fillAlpha number

the alpha of the fill

fill boolean

whether or not the shape is filled with a colour

nativeLines boolean

the method for drawing lines

shape Tiny.Circle | Tiny.Rectangle | Tiny.Ellipse | Tiny.Polygon

The shape object to draw.

lineAlignment number

the alignment of the line.

Members

fillboolean

whether or not the shape is filled with a colour

fillAlphanumber

the alpha of the fill

fillColornumber

the color of the fill

lineAlignmentnumber

The alignment of any lines drawn (0.5 = middle, 1 = outter, 0 = inner).

Version:
  • 1.2.0
Default Value:
  • 0

lineAlphanumber

the alpha of the line to draw

lineColornumber

the color of the line to draw

lineWidthnumber

the width of the line to draw

nativeLinesboolean

if true the liens will be draw using LINES instead of TRIANGLE_STRIP

The shape object to draw.

typenumber

The type of the shape, see the Const.Shapes file for all the existing types

Methods

Adds a hole to the shape.

Name Type Description
shape Tiny.Rectangle | Tiny.Circle

The shape of the hole.

Creates a new GraphicsData object with the same values as this one.

Returns:
Type Description
Tiny.GraphicsData Cloned GraphicsData object

Destroys the Graphics data.

Documentation generated by JSDoc 3.4.3 on Fri Jul 09 2021 19:32:26 GMT+0800 (CST)