Gondwana Game Engine Development (master) - 2.6.1
Gondwana is a cross-platform 2.5D game and rendering engine written in C#/.NET 8. It provides fine-grained control over rendering, timing, and scene composition, with built-in support for parallax, z-ordering, pixel overhang, collision detection, and particle effects. Gondwana targets desktop and web platforms using SkiaSharp for graphics and pluggable audio backends for desktop and browser targets.
Loading...
Searching...
No Matches
Gondwana.Drawing.Frame Struct Reference

Represents the source Tilesheet and its coordinates to render on a destination. More...

Public Member Functions

 Frame (Tilesheet tilesheet, int xTile, int yTile)
 Initializes a new instance of the Frame struct with the specified tilesheet and tile coordinates.
 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 TilesheetRegion.CollisionAdjust.
readonly bool ClearCollisionTypeOverride ()
 Removes this frame's explicit collision type so it once again inherits its region's TilesheetRegion.CollisionType.

Public Attributes

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 int YTile
 The vertical tile coordinate (row index) within the tilesheet.

Properties

readonly? SKBitmap SkBitmap [get]
 Gets the SkiaSharp bitmap for this frame.
readonly? SKImage SkImage [get]
 Gets the SkiaSharp image for this frame.
readonly Size TileSize [get]
 Gets the base tile size, without overhang.
readonly Spacing Overhang [get]
 Gets the overhang dimensions for this frame.
readonly Spacing TilePadding [get]
 Gets untransformed source atlas padding; placement transforms never alter slicing.
CollisionAdjust CollisionAdjust [get, set]
 Gets or sets the collision adjustment associated with this frame's region coordinates.
readonly bool HasCollisionAdjustOverride [get]
 Gets whether this frame has an explicit collision adjustment rather than inheriting its region's TilesheetRegion.CollisionAdjust.
readonly Rectangle CollisionArea [get]
 Gets the frame-local collision rectangle derived from TileSize and CollisionAdjust.
TileCollisionType CollisionType [get, set]
 Gets or sets the effective collision type associated with this frame's region coordinates.
readonly bool HasCollisionTypeOverride [get]
 Gets whether this frame has an explicit collision type rather than inheriting its region's TilesheetRegion.CollisionType.

Detailed Description

Represents the source Tilesheet and its coordinates to render on a destination.

Definition at line 11 of file Frame.cs.

Constructor & Destructor Documentation

◆ Frame() [1/2]

Gondwana.Drawing.Frame.Frame ( Tilesheet tilesheet,
int xTile,
int yTile )

Initializes a new instance of the Frame struct with the specified tilesheet and tile coordinates.

Parameters
tilesheetThe tilesheet.
xTileThe x tile.
yTileThe y tile.

Definition at line 39 of file Frame.cs.

◆ Frame() [2/2]

Gondwana.Drawing.Frame.Frame ( Tilesheet tilesheet,
string regionName,
int xTile,
int yTile )

Initializes a new instance of the Frame struct with the specified tilesheet and tile coordinates.

Parameters
tilesheetThe tilesheet.
regionNameThe name of the tilesheet region.
xTileThe x tile.
yTileThe y tile.

Definition at line 54 of file Frame.cs.

Member Function Documentation

◆ ClearCollisionAdjustOverride()

readonly bool Gondwana.Drawing.Frame.ClearCollisionAdjustOverride ( )

Removes this frame's explicit collision adjustment so it once again inherits its region's TilesheetRegion.CollisionAdjust.

Returns
true if an explicit collision adjustment was cleared; otherwise, false.

Definition at line 127 of file Frame.cs.

◆ ClearCollisionTypeOverride()

readonly bool Gondwana.Drawing.Frame.ClearCollisionTypeOverride ( )

Removes this frame's explicit collision type so it once again inherits its region's TilesheetRegion.CollisionType.

Returns
true if an explicit collision type was cleared; otherwise, false.

Definition at line 175 of file Frame.cs.

Member Data Documentation

◆ RegionName

readonly string Gondwana.Drawing.Frame.RegionName

The tilesheet region that contains the source bitmap for this frame.

Definition at line 21 of file Frame.cs.

◆ Tilesheet

readonly Tilesheet Gondwana.Drawing.Frame.Tilesheet

The tilesheet that contains the source bitmap for this frame.

Definition at line 16 of file Frame.cs.

◆ XTile

readonly int Gondwana.Drawing.Frame.XTile

The horizontal tile coordinate (column index) within the tilesheet.

Definition at line 26 of file Frame.cs.

◆ YTile

readonly int Gondwana.Drawing.Frame.YTile

The vertical tile coordinate (row index) within the tilesheet.

Definition at line 31 of file Frame.cs.

Property Documentation

◆ CollisionAdjust

CollisionAdjust Gondwana.Drawing.Frame.CollisionAdjust
getset

Gets or sets the collision adjustment associated with this frame's region coordinates.

A frame is a lightweight tilesheet reference, so assigning this property updates the authoritative per-frame metadata owned by TilesheetRegion and its cache.

Definition at line 98 of file Frame.cs.

◆ CollisionArea

readonly Rectangle Gondwana.Drawing.Frame.CollisionArea
get

Gets the frame-local collision rectangle derived from TileSize and CollisionAdjust.

Definition at line 140 of file Frame.cs.

◆ CollisionType

TileCollisionType Gondwana.Drawing.Frame.CollisionType
getset

Gets or sets the effective collision type associated with this frame's region coordinates.

Definition at line 146 of file Frame.cs.

◆ HasCollisionAdjustOverride

readonly bool Gondwana.Drawing.Frame.HasCollisionAdjustOverride
get

Gets whether this frame has an explicit collision adjustment rather than inheriting its region's TilesheetRegion.CollisionAdjust.

Definition at line 116 of file Frame.cs.

◆ HasCollisionTypeOverride

readonly bool Gondwana.Drawing.Frame.HasCollisionTypeOverride
get

Gets whether this frame has an explicit collision type rather than inheriting its region's TilesheetRegion.CollisionType.

Definition at line 164 of file Frame.cs.

◆ Overhang

readonly Spacing Gondwana.Drawing.Frame.Overhang
get

Gets the overhang dimensions for this frame.

Definition at line 86 of file Frame.cs.

◆ SkBitmap

readonly? SKBitmap Gondwana.Drawing.Frame.SkBitmap
get

Gets the SkiaSharp bitmap for this frame.

Definition at line 65 of file Frame.cs.

◆ SkImage

readonly? SKImage Gondwana.Drawing.Frame.SkImage
get

Gets the SkiaSharp image for this frame.

Definition at line 70 of file Frame.cs.

◆ TilePadding

readonly Spacing Gondwana.Drawing.Frame.TilePadding
get

Gets untransformed source atlas padding; placement transforms never alter slicing.

Definition at line 89 of file Frame.cs.

◆ TileSize

readonly Size Gondwana.Drawing.Frame.TileSize
get

Gets the base tile size, without overhang.

Definition at line 81 of file Frame.cs.