KernelAPI reference
Struct RecordingOverlayCanvas.Shape
Namespace: MicroEngine.Core
Assembly: MicroEngine.dll
Guide: Game lifecycle and time
One recorded drawing call.
public readonly struct RecordingOverlayCanvas.Shape : IEquatable<RecordingOverlayCanvas.Shape>Implements
IEquatable<RecordingOverlayCanvas.Shape>
Constructors
Shape(string, Vector2, float, Color, string?)
One recorded drawing call.
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).
public Vector2 Center { get; init; }Property Value
Color
The colour drawn.
public Color Color { get; init; }Property Value
Kind
“circle”, “ring”, “triangle”, “rect”, “text” or “image”.
public string Kind { get; init; }Property Value
Size
Radius for circles and rings, width for rectangles, the length of the first side for triangles, height for text.
public float Size { get; init; }Property Value
Text
The text, for “text” shapes; otherwise null.
public string? Text { get; init; }Property Value
Methods
Deconstruct(out string, out Vector2, out float, out Color, out string?)
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)
public override bool Equals(object obj)Parameters
obj object
Returns
Equals(Shape)
public bool Equals(RecordingOverlayCanvas.Shape other)Parameters
other RecordingOverlayCanvas.Shape
Returns
GetHashCode()
public override int GetHashCode()Returns
ToString()
public override string ToString()Returns
Operators
operator ==(Shape, Shape)
public static bool operator ==(RecordingOverlayCanvas.Shape left, RecordingOverlayCanvas.Shape right)Parameters
left RecordingOverlayCanvas.Shape
right RecordingOverlayCanvas.Shape
Returns
operator !=(Shape, Shape)
public static bool operator !=(RecordingOverlayCanvas.Shape left, RecordingOverlayCanvas.Shape right)Parameters
left RecordingOverlayCanvas.Shape
right RecordingOverlayCanvas.Shape