Frame
A frame: a region of a surface, in its pixels. scale: source pixels per stage unit (baked at the backing resolution).
Extends
Section titled “Extends”Properties
Section titled “Properties”x:
number
Left, pixels.
Inherited from
Section titled “Inherited from”y:
number
Top, pixels.
Inherited from
Section titled “Inherited from”w:
number
Width, pixels.
Inherited from
Section titled “Inherited from”h:
number
Height, pixels.
Inherited from
Section titled “Inherited from”surface
Section titled “surface”surface:
Surface
The surface (atlas page or image) it is a region of.
scale:
number
Pixels per stage unit it was baked at: the frame is drawn w / scale × h / scale stage units by default.
gen:
number
The atlas generation it belongs to: frames of an older one were wiped. 0: not in the atlas (an image).
ox:
number
Where the frame’s origin sits inside it, in stage units (the centre of a shape, the baseline of a text).
oy:
number
Vertical position of the origin inside the frame, stage units.
margin
Section titled “margin”margin:
number
Paint around the content (outline, glow), stage units: the content box is the frame minus this on every side.
optionalsw?:number
A trimmed frame of a loaded atlas: the untrimmed width, pixels (the region sits at tx, ty inside it).
optionalsh?:number
The untrimmed height, pixels.
optionaltx?:number
Where the trimmed region starts inside the untrimmed frame, pixels.
optionalty?:number
Where the trimmed region starts inside the untrimmed frame, pixels (down).
slice?
Section titled “slice?”
optionalslice?:Insets
Nine-slice insets, pixels, [top, right, bottom, left] (CSS order): a loaded atlas’s scale9Borders. Sprites of
the frame are nine-sliced by default.