An attachment that displays a textured quadrilateral.

See Region attachments in the Spine User Guide.

Static variables

@:value(0)staticinlineread onlyBLX:Int = 0

@:value(1)staticinlineread onlyBLY:Int = 1

@:value(2)staticinlineread onlyULX:Int = 2

@:value(3)staticinlineread onlyULY:Int = 3

@:value(4)staticinlineread onlyURX:Int = 4

@:value(5)staticinlineread onlyURY:Int = 5

@:value(6)staticinlineread onlyBRX:Int = 6

@:value(7)staticinlineread onlyBRY:Int = 7

Constructor

new(name:String)

Methods

updateOffset():Void

Calculates the {@link #offset} using the region settings. Must be called after changing region settings.

setRegion(region:TextureRegion):Void

getRegion():TextureRegion

computeWorldVertices(bone:Bone, worldVertices:FloatArray, offset:Int, stride:Int):Void

Transforms the attachment's four vertices to world coordinates.

See World transforms in the Spine Runtimes Guide.

Parameters:

worldVertices

The output world vertices. Must have a length >= offset + 8.

offset

The worldVertices index to begin writing values.

stride

The number of worldVertices entries between the value pairs written.

getOffset():FloatArray

For each of the 4 vertices, a pair of x,y values that is the local position of the vertex.

See {@link #updateOffset()}.

getX():Float

The local x translation.

getY():Float

The local y translation.

getScaleX():Float

The local scaleX.

getScaleY():Float

The local scaleY.

getRotation():Float

The local rotation.

getWidth():Float

The width of the region attachment in Spine.

getHeight():Float

The height of the region attachment in Spine.

getColor():Color

The color to tint the region attachment.

getPath():String

The name of the texture region for this attachment.

Inherited Variables

Inherited Methods

Defined by Attachment

getName():String

The attachment's name.