Skip to content

KernelAPI reference

Interface IScreenView

Namespace: MicroEngine.Core
Assembly: MicroEngine.dll
Guide: The world view and the UI view

The UI view of a platform that draws at the window’s resolution: a capability (TryGetCapability``1) of the SDL and raylib platforms and of the headless platform. The world is drawn into the canvas (BeginFrame) and scaled into WorldFrame; the UI view is drawn in UI units (window pixels divided by UiScale) and composited over it, so its text and shapes have the window’s resolution whatever the canvas’s.

C#
public interface IScreenView

Properties

CanvasSize

The canvas’s current size in pixels (larger than the configured one with an expanding presentation).

C#
(int Width, int Height) CanvasSize { get; }

Property Value

(int Width, int Height)

ScreenPixels

The window’s drawable size in pixels.

C#
(int Width, int Height) ScreenPixels { get; }

Property Value

(int Width, int Height)

UiScale

Window pixels per UI unit (UiScale).

C#
float UiScale { get; }

Property Value

float

WorldFrame

Where the canvas lands in the window, in window pixels.

C#
RectF WorldFrame { get; }

Property Value

RectF

Methods

BeginUi()

Starts this frame’s UI view, transparent; called after BeginFrame, at most once per frame.

C#
IRenderer BeginUi()

Returns

IRenderer