静态
fitDOMElementThe reference to the DOM element.
The coordinate space. It should not be a reference to Stage.
The x coordinate relative to the coordinateSpace.
The y coordinate relative to the coordinateSpace.
The width of the area.
The height of the area.
静态
get静态
getThe Sprite object to calculate.
The object with the calculated values.
静态
getThe display object Sprite.
The X-axis coordinate of the first point.
The Y-axis coordinate of the first point.
The X-axis coordinate of the second point.
The Y-axis coordinate of the second point.
可选
out: RectangleThe rectangle object to be returned. If not provided, a new rectangle object will be created.
The rectangle object Rectangle composed of the two points on the stage coordinate system.
静态
getThe Sprite object for which to retrieve the bounding rectangle.
可选
sizeOnly: booleanIf true, only the size of the sprite is considered, ignoring the graphics and children. Default is true.
可选
out: RectangleAn optional Rectangle object to store the result. If not provided, a new Rectangle object will be created.
A Rectangle object representing the bounding rectangle of the sprite.
静态
getThe coordinate space, must not be a Stage reference.
The x coordinate relative to the coordinateSpace
.
The y coordinate relative to the coordinateSpace
.
An object containing the transformed x, y coordinates, and scale factor.
静态
global静态
local静态
set静态
transformThe Sprite object whose local rectangle is to be transformed.
The local rectangle to be transformed.
可选
targetSpace: SpriteThe target Sprite object representing the coordinate space to which the rectangle should be transformed. If not provided, the transformation will be done in the global coordinate space.
可选
out: RectangleAn optional Rectangle object to store the result. If not provided, a new Rectangle object will be created.
The transformed rectangle in the target coordinate space.
En
The SpriteUtils class provides utility methods for working with Sprite objects in LayaAir.
Zh
SpriteUtils 类提供了用于处理 LayaAir 中的 Sprite 对象的实用方法。
Blueprintable