Viewport

Namespace: Murder.Core
Assembly: Murder.dll

public sealed struct Viewport

⭐ Constructors

public Viewport(Point viewportSize, Point nativeResolution, ViewportResizeStyle resizeStyle)

Parameters
viewportSize Point
nativeResolution Point
resizeStyle ViewportResizeStyle

⭐ Properties

Center

public readonly Vector2 Center;

Returns
Vector2

NativeResolution

public readonly Point NativeResolution;

The resolution that the game is actually rendered

Returns
Point

OutputRectangle

public readonly IntRectangle OutputRectangle;

The rectangle where the game should be rendered on the screen.

Returns
IntRectangle

Scale

public readonly Vector2 Scale;

The scale that is applied to the native resolution before rendering

Returns
Vector2

Size

public readonly Point Size;

The size of the viewport (tipically the game's window)

Returns
Point

⭐ Methods

HasChanges(Point, Vector2)

public bool HasChanges(Point size, Vector2 scale)

Parameters
size Point
scale Vector2

Returns
bool