Scripting API

Scripting API

PaintBatch

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

A run of indices drawn with one texture, clipped to one rectangle.

public readonly record struct PaintBatch

Remarks

Thirty-two bytes, sequential, mirrored by abyss_core::paint::PaintBatch. This is a draw command: the same thing every immediate-mode library emits and the same thing a graphics API would be told, minus the parts that are the engine's business.

An empty or inverted rectangle means nothing in this batch is visible, which an interface says constantly — a collapsed panel, a row scrolled out of a list — and is not an error.

Constructors

PaintBatch

public PaintBatch(float ClipMinX, float ClipMinY, float ClipMaxX, float ClipMaxY, uint IndexOffset, uint IndexCount, uint Texture, uint Reserved = 0)

A run of indices drawn with one texture, clipped to one rectangle.

Parameters

  • ClipMinX: Left edge of the clip rectangle, in logical pixels.
  • ClipMinY: Top edge of the clip rectangle.
  • ClipMaxX: Right edge of the clip rectangle.
  • ClipMaxY: Bottom edge of the clip rectangle.
  • IndexOffset: Where this batch's indices start.
  • IndexCount: How many indices it uses. A multiple of three.
  • Texture: Which texture to draw it with, from SetPaintTexture. Painting.WhiteTexture for none.
  • Reserved: Always zero. Present so the struct has no implicit tail padding for the two sides to disagree about.

Thirty-two bytes, sequential, mirrored by abyss_core::paint::PaintBatch. This is a draw command: the same thing every immediate-mode library emits and the same thing a graphics API would be told, minus the parts that are the engine's business.

An empty or inverted rectangle means nothing in this batch is visible, which an interface says constantly — a collapsed panel, a row scrolled out of a list — and is not an error.

Properties

ClipMinX

public float ClipMinX { get; init; }

Left edge of the clip rectangle, in logical pixels.

ClipMinY

public float ClipMinY { get; init; }

Top edge of the clip rectangle.

ClipMaxX

public float ClipMaxX { get; init; }

Right edge of the clip rectangle.

ClipMaxY

public float ClipMaxY { get; init; }

Bottom edge of the clip rectangle.

IndexOffset

public uint IndexOffset { get; init; }

Where this batch's indices start.

IndexCount

public uint IndexCount { get; init; }

How many indices it uses. A multiple of three.

Texture

public uint Texture { get; init; }

Which texture to draw it with, from SetPaintTexture. Painting.WhiteTexture for none.

Reserved

public uint Reserved { get; init; }

Always zero. Present so the struct has no implicit tail padding for the two sides to disagree about.