RegionAttachment

Attachmentspine.attachments.RegionAttachment (Class)

An attachment that displays a textured quadrilateral.

See Region attachments in the Spine User Guide.

Static Members

spine
BLX: Int

spine
BLY: Int

spine
ULX: Int

spine
ULY: Int

spine
URX: Int

spine
URY: Int

spine
BRX: Int

spine
BRY: Int

Instance Members

spine
updateOffset(): Void

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


Name Type
region spine.support.graphics.TextureRegion

Returns
spine.support.graphics.TextureRegion

spine
computeWorldVertices(bone: spine.Bone, worldVertices: spine.support.utils.FloatArray, offset: Int, stride: Int): Void

Transforms the attachment's four vertices to world coordinates.

See World transforms in the Spine Runtimes Guide.

Name Type Description
bone spine.Bone
worldVertices spine.support.utils.FloatArray The output world vertices. Must have a length >= offset + 8.
offset Int The worldVertices index to begin writing values.
stride Int The number of worldVertices entries between the value pairs written.

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

See {@link #updateOffset()}. | Returns | |---------| | [spine.support.utils.FloatArray](/api-docs/clay-native/spine/support/utils/FloatArray/) |


Returns
spine.support.utils.FloatArray

spine
getX(): Float

The local x translation.

Returns
Float

spine
setX(x: Float): Void
Name Type
x Float

spine
getY(): Float

The local y translation.

Returns
Float

spine
setY(y: Float): Void
Name Type
y Float

spine
getScaleX(): Float

The local scaleX.

Returns
Float

spine
setScaleX(scaleX: Float): Void
Name Type
scaleX Float

spine
getScaleY(): Float

The local scaleY.

Returns
Float

spine
setScaleY(scaleY: Float): Void
Name Type
scaleY Float

spine
getRotation(): Float

The local rotation.

Returns
Float

spine
setRotation(rotation: Float): Void
Name Type
rotation Float

spine
getWidth(): Float

The width of the region attachment in Spine.

Returns
Float

spine
setWidth(width: Float): Void
Name Type
width Float

spine
getHeight(): Float

The height of the region attachment in Spine.

Returns
Float

spine
setHeight(height: Float): Void
Name Type
height Float

The color to tint the region attachment.

Returns
spine.support.graphics.Color

spine
getPath(): String

The name of the texture region for this attachment.

Returns
String

spine
setPath(path: String): Void
Name Type
path String

spine
copy(): Attachment
Returns
Attachment

spine
new(name: String): Void
Name Type
name String

Private Members


spine
path: String

spine
x: Float

spine
y: Float

spine
scaleX: Float

spine
scaleY: Float

spine
rotation: Float

spine
width: Float

spine
height: Float