Scripting API

Scripting API

UiCanvasLaid

Record struct in Abyss.Core, from Abyss.Core.

How an element of a UI document open on its own is laid out on its canvas, in the document's own pixels.

public readonly record struct UiCanvasLaid

Constructors

UiCanvasLaid

public UiCanvasLaid(ulong Drawn, Vector2 Size, Vector2 Offset, Vector2 Within, float Scale)

How an element of a UI document open on its own is laid out on its canvas, in the document's own pixels.

Parameters

  • Drawn: The element drawn for it, whose Node is the element's as its sheets style it.
  • Size: Its width and its height, to the outside of its border.
  • Offset: Where its top left corner is from the inside of its parent's border, where an absolute element's insets are measured from; from the screen's corner for a top element.
  • Within: What a share of its width, its height or its insets is of: the inside of its parent's border for an absolute element, its parent's content for one in the flow, and the screen for a top element.
  • Scale: The screen's pixels to one of the document's: what the reference resolution scales it by.

Properties

Drawn

public ulong Drawn { get; init; }

The element drawn for it, whose Node is the element's as its sheets style it.

Size

public Vector2 Size { get; init; }

Its width and its height, to the outside of its border.

Offset

public Vector2 Offset { get; init; }

Where its top left corner is from the inside of its parent's border, where an absolute element's insets are measured from; from the screen's corner for a top element.

Within

public Vector2 Within { get; init; }

What a share of its width, its height or its insets is of: the inside of its parent's border for an absolute element, its parent's content for one in the flow, and the screen for a top element.

Scale

public float Scale { get; init; }

The screen's pixels to one of the document's: what the reference resolution scales it by.