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
-
addHole(shape)
-
Adds a hole to the shape.
Name Type Description shape
Tiny.Rectangle | Tiny.Circle The shape of the hole.
-
clone() ❯ {Tiny.GraphicsData}
-
Creates a new GraphicsData object with the same values as this one.
Returns:
Type Description Tiny.GraphicsData Cloned GraphicsData object -
destroy()
-
Destroys the Graphics data.