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.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.DirectDrawingBase Gondwana.Drawing.Direct.IDirectCompositeChild Gondwana.Drawing.Sprites.Sprite Gondwana.Scenes.SceneLayerTile Gondwana.Drawing.Direct.DirectDarknessOverlay Gondwana.Drawing.Direct.DirectDrawingMovableBase Gondwana.Drawing.Direct.DirectRadialLight Gondwana.Drawing.Direct.DirectSceneLayerDarknessOverlay Gondwana.Drawing.Direct.DirectComposite Gondwana.Drawing.Direct.DirectDrawingMovableBase Gondwana.Drawing.Direct.DirectImage Gondwana.Drawing.Direct.DirectRectangle Gondwana.Drawing.Direct.DirectSvg Gondwana.Drawing.Direct.DirectVideo Gondwana.Drawing.Direct.ImageLayer.ImageInstanceLayer Gondwana.Drawing.Direct.Particles.ParticleSurface Gondwana.Drawing.Direct.TextBlock Gondwana.Widgets.WidgetBase Gondwana.Drawing.Direct.DirectImage Gondwana.Drawing.Direct.DirectRectangle Gondwana.Drawing.Direct.DirectSvg Gondwana.Drawing.Direct.DirectVideo Gondwana.Drawing.Direct.ImageLayer.ImageInstanceLayer 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.

Definition at line 13 of file IDrawable.cs.

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, Gondwana.Drawing.Sprites.Sprite, Gondwana.Drawing.Tile, and Gondwana.Scenes.SceneLayerTile.

◆ 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.

Definition at line 18 of file IDrawable.cs.

◆ 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.

Definition at line 23 of file IDrawable.cs.

◆ 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, Gondwana.Drawing.Sprites.Sprite, and Gondwana.Drawing.Tile.

Definition at line 28 of file IDrawable.cs.

◆ 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.

Definition at line 34 of file IDrawable.cs.