![]() |
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.
|
Represents the abstract base class for render surface adapters that present backbuffer output to a destination surface. More...
Public Member Functions | |
| Point | AdapterPxToScreenPx (PointF adapterPx) |
| Converts adapter input to logical ScreenPx, retaining outside coordinates for capture/leave. | |
| void | DrawImage (SKCanvas canvas, SKImage image, SKColor clearColor) |
| Presents a complete image using the same transform as pointer normalization. | |
| void | Present (SKImage bufferImage, SKRectI bufferRect, SKRect destRect) |
| Presents the specified portion of the Backbuffer image to the destination rectangle on the RenderSurfaceAdapter. | |
Protected Member Functions | |
| RenderSurfaceAdapterBase (int destWidth, int destHeight) | |
| Initializes a new instance of the RenderSurfaceAdapterBase class with the specified dimensions. | |
| RenderSurfaceAdapterBase (int destWidth, int destHeight, bool initialSizeAvailable) | |
| Constructs an adapter whose initial layout may still be pending. | |
| void | SetDestinationSize (int destWidth, int destHeight) |
| Sets the destination size of the render surface and raises the Resized event if the dimensions have changed. | |
Properties | |
| PresentationTransform | Presentation [get] |
| Current immutable aspect-preserving mapping of Backbuffer ScreenPx to adapter pixels. | |
| float | PresentationScale [get] |
| Current derived presentation scale; adapter resize does not resize the Backbuffer. | |
| int | Width [get, protected set] |
| Gets the current width of the render surface in pixels. | |
| int | Height [get, protected set] |
| Gets the current height of the render surface in pixels. | |
Events | |
| Action< RenderSurfaceAdapterResizedEventArgs >? | Resized |
| Occurs when the render surface adapter is resized. | |
Represents the abstract base class for render surface adapters that present backbuffer output to a destination surface.
Definition at line 10 of file RenderSurfaceAdapterBase.cs.
|
protected |
Initializes a new instance of the RenderSurfaceAdapterBase class with the specified dimensions.
| destWidth | The initial width of the render surface in pixels. |
| destHeight | The initial height of the render surface in pixels. |
Definition at line 102 of file RenderSurfaceAdapterBase.cs.
|
protected |
Constructs an adapter whose initial layout may still be pending.
| destWidth | Initial or placeholder adapter width. |
| destHeight | Initial or placeholder adapter height. |
| initialSizeAvailable | False for hosts constructed before layout; the first valid size establishes resolution once. |
Definition at line 109 of file RenderSurfaceAdapterBase.cs.
| Point Gondwana.Rendering.RenderSurfaceAdapterBase.AdapterPxToScreenPx | ( | PointF | adapterPx | ) |
Converts adapter input to logical ScreenPx, retaining outside coordinates for capture/leave.
| adapterPx | The adapter px. |
Definition at line 41 of file RenderSurfaceAdapterBase.cs.
| void Gondwana.Rendering.RenderSurfaceAdapterBase.DrawImage | ( | SKCanvas | canvas, |
| SKImage | image, | ||
| SKColor | clearColor ) |
Presents a complete image using the same transform as pointer normalization.
| canvas | The canvas. |
| image | The image. |
| clearColor | The clear color. |
Definition at line 52 of file RenderSurfaceAdapterBase.cs.
|
abstract |
Presents the specified portion of the Backbuffer image to the destination rectangle on the RenderSurfaceAdapter.
The method maps the specified region of the buffer image to the destination rectangle, scaling or transforming as necessary. Callers must ensure that the dimensions and coordinates of bufferRect and destRect are valid.
| bufferImage | The source image from which to present. Cannot be null. |
| bufferRect | The rectangular region of the buffer image to present. Coordinates are in the buffer image's space. |
| destRect | The rectangular region in the destination space where the presented content will be drawn. |
|
protected |
Sets the destination size of the render surface and raises the Resized event if the dimensions have changed.
| destWidth | The new width of the render surface in pixels. |
| destHeight | The new height of the render surface in pixels. |
If dimensions and size availability are unchanged, this method returns without raising Resized. The first valid layout raises the event even if it matches the placeholder dimensions.
Definition at line 124 of file RenderSurfaceAdapterBase.cs.
|
getprotected set |
Gets the current height of the render surface in pixels.
The height of the render surface.
Definition at line 91 of file RenderSurfaceAdapterBase.cs.
|
get |
Current immutable aspect-preserving mapping of Backbuffer ScreenPx to adapter pixels.
Definition at line 24 of file RenderSurfaceAdapterBase.cs.
|
get |
Current derived presentation scale; adapter resize does not resize the Backbuffer.
Definition at line 27 of file RenderSurfaceAdapterBase.cs.
|
getprotected set |
Gets the current width of the render surface in pixels.
The width of the render surface.
Definition at line 81 of file RenderSurfaceAdapterBase.cs.
| Action<RenderSurfaceAdapterResizedEventArgs>? Gondwana.Rendering.RenderSurfaceAdapterBase.Resized |
Occurs when the render surface adapter is resized.
This event is raised when the Width or Height properties change, providing both the old and new dimensions in the event arguments.
Definition at line 75 of file RenderSurfaceAdapterBase.cs.