Skip to content

KernelAPI reference

Struct RecordingOverlayCanvas.Shape

Namespace: MicroEngine.Core
Assembly: MicroEngine.dll
Guide: Game lifecycle and time

One recorded drawing call.

C#
public readonly struct RecordingOverlayCanvas.Shape : IEquatable<RecordingOverlayCanvas.Shape>

Implements

IEquatable<RecordingOverlayCanvas.Shape>

Constructors

Shape(string, Vector2, float, Color, string?)

One recorded drawing call.

C#
public Shape(string Kind, Vector2 Center, float Size, Color Color, string? Text = null)

Parameters

Kind string

“circle”, “ring”, “triangle”, “rect”, “text” or “image”.

Center Vector2

Centre of the shape (the centroid for a triangle).

Size float

Radius for circles and rings, width for rectangles, the length of the first side for triangles, height for text.

Color Color

The colour drawn.

Text string?

The text, for “text” shapes; otherwise null.

Properties

Center

Centre of the shape (the centroid for a triangle).

C#
public Vector2 Center { get; init; }

Property Value

Vector2

Color

The colour drawn.

C#
public Color Color { get; init; }

Property Value

Color

Kind

“circle”, “ring”, “triangle”, “rect”, “text” or “image”.

C#
public string Kind { get; init; }

Property Value

string

Size

Radius for circles and rings, width for rectangles, the length of the first side for triangles, height for text.

C#
public float Size { get; init; }

Property Value

float

Text

The text, for “text” shapes; otherwise null.

C#
public string? Text { get; init; }

Property Value

string?

Methods

Deconstruct(out string, out Vector2, out float, out Color, out string?)

C#
public void Deconstruct(out string Kind, out Vector2 Center, out float Size, out Color Color, out string? Text)

Parameters

Kind string

Center Vector2

Size float

Color Color

Text string?

Equals(object)

C#
public override bool Equals(object obj)

Parameters

obj object

Returns

bool

Equals(Shape)

C#
public bool Equals(RecordingOverlayCanvas.Shape other)

Parameters

other RecordingOverlayCanvas.Shape

Returns

bool

GetHashCode()

C#
public override int GetHashCode()

Returns

int

ToString()

C#
public override string ToString()

Returns

string

Operators

operator ==(Shape, Shape)

C#
public static bool operator ==(RecordingOverlayCanvas.Shape left, RecordingOverlayCanvas.Shape right)

Parameters

left RecordingOverlayCanvas.Shape

right RecordingOverlayCanvas.Shape

Returns

bool

operator !=(Shape, Shape)

C#
public static bool operator !=(RecordingOverlayCanvas.Shape left, RecordingOverlayCanvas.Shape right)

Parameters

left RecordingOverlayCanvas.Shape

right RecordingOverlayCanvas.Shape

Returns

bool