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.WinForms.Rendering.WinFormBitmapRenderSurfaceAdapter Class Reference

Provides a render surface adapter for Windows Forms using SKControl and bitmap-based rendering. More...

Inheritance diagram for Gondwana.WinForms.Rendering.WinFormBitmapRenderSurfaceAdapter:
Gondwana.Rendering.RenderSurfaceAdapterBase

Public Member Functions

 WinFormBitmapRenderSurfaceAdapter (SKControl control)
 Initializes a new instance of the WinFormBitmapRenderSurfaceAdapter class.
void RefreshDestinationSize ()
 Refreshes the destination size based on the current client size of the control.
override void Present (SKImage bufferImage, SKRectI bufferRect, SKRect destRect)
 Presents the specified buffer image to the render surface.
void Dispose ()
 Releases all resources used by the WinFormBitmapRenderSurfaceAdapter.
Public Member Functions inherited from Gondwana.Rendering.RenderSurfaceAdapterBase
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.

Additional Inherited Members

Protected Member Functions inherited from Gondwana.Rendering.RenderSurfaceAdapterBase
 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 inherited from Gondwana.Rendering.RenderSurfaceAdapterBase
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 inherited from Gondwana.Rendering.RenderSurfaceAdapterBase
Action< RenderSurfaceAdapterResizedEventArgs >? Resized
 Occurs when the render surface adapter is resized.

Detailed Description

Provides a render surface adapter for Windows Forms using SKControl and bitmap-based rendering.

Definition at line 11 of file WinFormBitmapRenderSurfaceAdapter.cs.

Constructor & Destructor Documentation

◆ WinFormBitmapRenderSurfaceAdapter()

Gondwana.WinForms.Rendering.WinFormBitmapRenderSurfaceAdapter.WinFormBitmapRenderSurfaceAdapter ( SKControl control)

Initializes a new instance of the WinFormBitmapRenderSurfaceAdapter class.

Parameters
controlThe SKControl to use as the render target.
Exceptions
ArgumentNullExceptionThrown when control is null.

Definition at line 25 of file WinFormBitmapRenderSurfaceAdapter.cs.

Member Function Documentation

◆ Dispose()

void Gondwana.WinForms.Rendering.WinFormBitmapRenderSurfaceAdapter.Dispose ( )

Releases all resources used by the WinFormBitmapRenderSurfaceAdapter.

Definition at line 141 of file WinFormBitmapRenderSurfaceAdapter.cs.

◆ Present()

override void Gondwana.WinForms.Rendering.WinFormBitmapRenderSurfaceAdapter.Present ( SKImage bufferImage,
SKRectI bufferRect,
SKRect destRect )

Presents the specified buffer image to the render surface.

Parameters
bufferImageThe image to present.
bufferRectThe source rectangle within the buffer image.
destRectThe destination rectangle on the render surface.

Definition at line 61 of file WinFormBitmapRenderSurfaceAdapter.cs.

◆ RefreshDestinationSize()

void Gondwana.WinForms.Rendering.WinFormBitmapRenderSurfaceAdapter.RefreshDestinationSize ( )

Refreshes the destination size based on the current client size of the control.

Definition at line 46 of file WinFormBitmapRenderSurfaceAdapter.cs.