Scripting API

Scripting API

ImageRegion

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

A rectangle of an image, in its pixels from its top-left: what UiElement.SetImage draws of it.

public readonly record struct ImageRegion

Constructors

ImageRegion

public ImageRegion(float Left, float Top, float Right, float Bottom)

A rectangle of an image, in its pixels from its top-left: what UiElement.SetImage draws of it.

Parameters

  • Left: Its left edge.
  • Top: Its top edge.
  • Right: Its right edge, past its left.
  • Bottom: Its bottom edge, below its top.

Properties

Left

public float Left { get; init; }

Its left edge.

Top

public float Top { get; init; }

Its top edge.

public float Right { get; init; }

Its right edge, past its left.

Bottom

public float Bottom { get; init; }

Its bottom edge, below its top.

Methods

At

public static ImageRegion At(float x, float y, float width, float height)

The rectangle at (x, y) as wide and as tall as said: a cell of a sheet.

Parameters

  • x
  • y
  • width
  • height