Gondwana Game Engine
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, mobile, and web platforms using SkiaSharp for graphics and NAudio for sound.
Loading...
Searching...
No Matches
Gondwana.Drawing.IDrawable Interface Reference

Represents an object that can be drawn on a visual surface, with properties for visibility and stacking order. More...

Inheritance diagram for Gondwana.Drawing.IDrawable:
Gondwana.Drawing.Direct.IDirectDrawable Gondwana.Drawing.Tile Gondwana.Drawing.Direct.DirectComposite Gondwana.Drawing.Direct.DirectDrawingBase Gondwana.Drawing.Sprites.Sprite Gondwana.Scenes.SceneLayerTile Gondwana.Drawing.Direct.DirectDrawingMovableBase Gondwana.Drawing.Direct.DirectVideo Gondwana.Drawing.Direct.DirectImage Gondwana.Drawing.Direct.DirectRectangle Gondwana.Drawing.Direct.Particles.ParticleSurface Gondwana.Drawing.Direct.TextBlock

Public Member Functions

RectangleF GetDrawLocationScreen (View view)
 Computes the object's destination rectangle in SCREEN pixels for rendering on the Backbuffer, using the provided View to project from world-space.
void Draw (BackbufferBase backbuffer, RectangleF destRectScreen)
 Draws the object to the Backbuffer using the provided SCREEN-space destination rectangle. The rectangle is assumed to already be projected into screen-space; no world-to-screen conversion should occur within this method.

Properties

Guid Id [get]
 Auto-assigned unique identifier for the object.
string? Nickname [get]
 Optional human-readable name associated with the object.
bool Visible [get]
 Gets a value indicating whether the object is visible.
int ZOrder [get]
 Gets the z-order of the element, which determines its visual stacking order relative to other elements. Higher z-order values are drawn on top of lower ones.

Detailed Description

Represents an object that can be drawn on a visual surface, with properties for visibility and stacking order.

The IDrawable interface defines the contract for drawable objects, including a unique identifier, optional nickname, visibility state, and z-order for determining the drawing order. Implementations of this interface must provide a mechanism to render the object via the Draw method.

Member Function Documentation

◆ Draw()

void Gondwana.Drawing.IDrawable.Draw ( BackbufferBase backbuffer,
RectangleF destRectScreen )

Draws the object to the Backbuffer using the provided SCREEN-space destination rectangle. The rectangle is assumed to already be projected into screen-space; no world-to-screen conversion should occur within this method.

Parameters
backbufferThe Backbuffer to draw onto.
destRectScreenThe destination rectangle in absolute SCREEN pixel coordinates on the Backbuffer.

Implemented in Gondwana.Drawing.Direct.DirectComposite, Gondwana.Drawing.Direct.DirectDrawingBase, and Gondwana.Drawing.Tile.

◆ GetDrawLocationScreen()

RectangleF Gondwana.Drawing.IDrawable.GetDrawLocationScreen ( View view)

Computes the object's destination rectangle in SCREEN pixels for rendering on the Backbuffer, using the provided View to project from world-space.

Parameters
viewThe View providing camera, zoom, parallax, and viewport offsets used to convert the object's world-space bounds into screen-space.
Returns
A rectangle in absolute SCREEN pixel coordinates on the Backbuffer.

Implemented in Gondwana.Drawing.Direct.DirectComposite, Gondwana.Drawing.Direct.DirectDrawingBase, and Gondwana.Drawing.Tile.

Property Documentation

◆ Id

Guid Gondwana.Drawing.IDrawable.Id
get

Auto-assigned unique identifier for the object.

Implemented in Gondwana.Drawing.Direct.DirectComposite, Gondwana.Drawing.Direct.DirectDrawingBase, and Gondwana.Drawing.Tile.

◆ Nickname

string? Gondwana.Drawing.IDrawable.Nickname
get

Optional human-readable name associated with the object.

Implemented in Gondwana.Drawing.Direct.DirectComposite, Gondwana.Drawing.Direct.DirectDrawingBase, and Gondwana.Drawing.Tile.

◆ Visible

bool Gondwana.Drawing.IDrawable.Visible
get

Gets a value indicating whether the object is visible.

Implemented in Gondwana.Drawing.Direct.DirectComposite, Gondwana.Drawing.Direct.DirectDrawingBase, and Gondwana.Drawing.Tile.

◆ ZOrder

int Gondwana.Drawing.IDrawable.ZOrder
get

Gets the z-order of the element, which determines its visual stacking order relative to other elements. Higher z-order values are drawn on top of lower ones.

Implemented in Gondwana.Drawing.Direct.DirectComposite, Gondwana.Drawing.Direct.DirectDrawingBase, Gondwana.Drawing.Sprites.Sprite, Gondwana.Drawing.Tile, and Gondwana.Scenes.SceneLayerTile.