class openfl.canvas.Object
Available on all platforms
Instance Fields
Gets a value indicating the bottom-most pixel of this object along the y-axis. This is the equivalent of the y position plus height.
var bottomLeft:Point
Gets a Point
indicating the bottom-left most corner of this object. If using any non-rectangular shape
and you wish to acquire a Point from a given angle
, you should call its respective function.
var bottomMiddle:Point
Gets a Point
indicating the bottom central position of this object. If using any non-rectangular shape
and you wish to acquire a Point from a given angle
, you should call its respective function.
var bottomRight:Point
Gets a Point
indicating the bottom-right most corner of this object. If using any non-rectangular shape
and you wish to acquire a Point from a given angle
, you should call its respective function.
var centerLeft:Point
Gets a Point
indicating the center left position of this object. If using any non-rectangular shape
and you wish to acquire a Point from a given angle
, you should call its respective function.
var centerMiddle:Point
Gets a Point
indicating the exact central position of this object. If using any non-rectangular shape
and you wish to acquire a Point from a given angle
, you should call its respective function.
var centerRight:Point
Gets a Point
indicating the center right position of this object. If using any non-rectangular shape
and you wish to acquire a Point from a given angle
, you should call its respective function.
Gets or sets the Matrix
indicating the transformation, positioning and rotation of the bitmap to style.
var fillBitmapRepeat:Bool
Gets or sets a value indicating whether or not the bitmap will repeat (tile).
var fillBitmapSmooth:Bool
Gets or sets a value indicating whether or not the bitmap edges will smooth out (blur).
Gets or sets a value indicating the solid Color
of the object to fill.
This sets the fillAlpha
value of the given Color, respectively.
Gets or sets a value indicating the focal point of the fill gradient, with values between -1 and 1, where 0 is the center.
var fillGradientAlphas:Array<Float>
Gets or sets a series of values indicating the opacity for each color indicated in fillGradientColors
.
var fillGradientColors:Array<Color>
Gets or sets a series of values indicating the Color
s to use in a gradient.
Gets or sets a matrix that indicates the transformation, positioning and rotation calculations for the given gradient.
var fillGradientRatios:Array<Int>
Gets or sets a series of values indicating the position ratio of each color indicated in fillGradientColors
. These
values go from 0-255.
var fillGradientSpreadMethod:SpreadMethod
Gets or sets a SpreadMethod
that indicates how gradients will spread across the given texture or graphics.
var fillGradientType:GradientType
Gets or sets a value indicating either a LINEAR
or RADIAL
gradient.
var fillInterpolationMethod:InterpolationMethod
Gets or sets a value indicating how the fill gradient is rendered.
Gets a value indicating the left-most pixel of this object along the x-axis. This is the equivalent of the x position.
Gets or sets a value representing the opacity of lines or borders. This is a percentage value from 0-1.
Gets or sets the Matrix
indicating the transformation, positioning and rotation of the bitmap to style.
var lineBitmapRepeat:Bool
Gets or sets a value indicating whether or not the bitmap will repeat (tile).
var lineBitmapSmooth:Bool
Gets or sets a value indicating whether or not the bitmap edges will smooth out (blur).
Gets or sets a value indicating the edges of a line. For example, ROUND
will result in both ends of a line
beiing rounded.
Gets or sets the Color
of the line when used to style borders or lines.
This sets the lineAlpha
value of the given Color, respectively.
Gets or sets a value indicating the focal point of the line gradient, with values between -1 and 1, where 0 is the center.
var lineGradientAlphas:Array<Float>
Gets or sets a series of values indicating the opacity for each color indicated in lineGradientColors
.
var lineGradientColors:Array<Color>
Gets or sets a series of values indicating the number of colors used in a gradient.
Gets or sets a matrix that indicates the transformation, positioning and rotation calculations for the given gradient.
var lineGradientRatios:Array<Int>
Gets or sets a series of values indicating the position ratio of each color indicated in lineGradientColors
. These
values go from 0-255.
var lineGradientSpreadMethod:SpreadMethod
Gets or sets a SpreadMethod
that indicates how gradients will spread across the given texture or graphics.
var lineGradientType:GradientType
Gets or sets a value indicating either a LINEAR
or RADIAL
gradient.
var lineInterpolationMethod:InterpolationMethod
Gets or sets a value indicating how the line gradient is rendered.
Gets or sets a value indicating the visual representation of lines that inter-connect. For example, ROUND
will result
in a border corner being rounded than completely rough; should not be confused with rounded rectangles.
var lineMiterLimit:Float
Gets or sets a value indicating the percentage limit of line thickness when JointStyle
is set to MITER
.
var lineScaleMode:LineScaleMode
Gets or sets a value indicating how lines are scaled when it's calling parent object is re-scaled.
var lineThickness:Float
Gets or sets the thickness of lines or borders. This can be a value from 0-255.
Gets a value indicating the right-most pixel of this object along the x-axis. This is the equivalent of the x position plus width.
Gets a value indicating the top-most pixel of this object along the y-axis. This is the equivalent of the y position.
Gets a Point
indicating the top-left most corner of this object. If using any non-rectangular shape
and you wish to acquire a Point from a given angle
, you should call its respective function.
Gets a Point
indicating the top central position of this object. If using any non-rectangular shape
and you wish to acquire a Point from a given angle
, you should call its respective function.
Gets a Point
indicating the top-right most corner of this object. If using any non-rectangular shape
and you wish to acquire a Point from a given angle
, you should call its respective function.
function new(?styleName:String = ''):Void
Creates a new object with the given style. If the StyleReader's CURRENT instance has been modified, the changes will take affect.
styleName | The name of the style as found in the JSON-formatted file to represent the visuals for
|
function draw(g:Graphics, ?applyFill:Bool = false):Void
The function used to commit the drawing for this object. This will only apply styling unless drawn via a derived class.
g | The graphics component that this object is drawn to. |
applyFill | A value indicating if fill styling options will be applied. Default is false. |