72 internal readonly SKImage? AtlasImage =>
Tilesheet?.AtlasImage;
74 internal readonly Rectangle AtlasSourceBounds =>
105 ??
throw new InvalidOperationException(
106 $
"Tilesheet region '{RegionName}' could not be resolved for this frame.");
108 region.SetFrameCollisionAdjust(
XTile,
YTile, value);
130 ??
throw new InvalidOperationException(
131 $
"Tilesheet region '{RegionName}' could not be resolved for this frame.");
133 return region.ClearFrameCollisionAdjustOverride(
XTile,
YTile);
153 ??
throw new InvalidOperationException(
154 $
"Tilesheet region '{RegionName}' could not be resolved for this frame.");
156 region.SetFrameCollisionType(
XTile,
YTile, value);
178 ??
throw new InvalidOperationException(
179 $
"Tilesheet region '{RegionName}' could not be resolved for this frame.");
181 return region.ClearFrameCollisionTypeOverride(
XTile,
YTile);
Represents a rectangular region within a tilesheet that contains a grid of frames.
static readonly string DefaultRegionName
The default name assigned to tilesheet regions when no name is specified.
record struct Spacing([property:JsonProperty("left")] int Left, [property:JsonProperty("top")] int Top, [property:JsonProperty("right")] int Right, [property:JsonProperty("bottom")] int Bottom)
Represents dimensions in pixels when spacing Tilesheets.
TileCollisionType
Defines the default collision behavior associated with a tilesheet region, frame, or runtime tile.
readonly? SKBitmap SkBitmap
Gets the SkiaSharp bitmap for this frame.
readonly bool ClearCollisionTypeOverride()
Removes this frame's explicit collision type so it once again inherits its region's TilesheetRegion....
Frame(Tilesheet tilesheet, string regionName, int xTile, int yTile)
Initializes a new instance of the Frame struct with the specified tilesheet and tile coordinates.
readonly bool ClearCollisionAdjustOverride()
Removes this frame's explicit collision adjustment so it once again inherits its region's TilesheetRe...
readonly Spacing TilePadding
Gets untransformed source atlas padding; placement transforms never alter slicing.
readonly bool HasCollisionTypeOverride
Gets whether this frame has an explicit collision type rather than inheriting its region's TilesheetR...
readonly Rectangle CollisionArea
Gets the frame-local collision rectangle derived from TileSize and CollisionAdjust.
CollisionAdjust CollisionAdjust
Gets or sets the collision adjustment associated with this frame's region coordinates.
readonly int YTile
The vertical tile coordinate (row index) within the tilesheet.
readonly Tilesheet Tilesheet
The tilesheet that contains the source bitmap for this frame.
readonly string RegionName
The tilesheet region that contains the source bitmap for this frame.
readonly int XTile
The horizontal tile coordinate (column index) within the tilesheet.
readonly? SKImage SkImage
Gets the SkiaSharp image for this frame.
Frame(Tilesheet tilesheet, int xTile, int yTile)
Initializes a new instance of the Frame struct with the specified tilesheet and tile coordinates.
readonly bool HasCollisionAdjustOverride
Gets whether this frame has an explicit collision adjustment rather than inheriting its region's Tile...
TileCollisionType CollisionType
Gets or sets the effective collision type associated with this frame's region coordinates.
readonly Size TileSize
Gets the base tile size, without overhang.
readonly Spacing Overhang
Gets the overhang dimensions for this frame.
Per-edge inset amounts applied to visual bounds to produce a collision rectangle.
static readonly CollisionAdjust None
Represents an adjustment with no pixel offsets.