struct property

StructType<Rectangle> struct
final

Describes the raw memory layout, construction, and pointer representation of this struct type.

Implementation

static final StructType<Rectangle> struct = ._builtin(
  factory: Rectangle.new,
  layout: .aligned<RectangleField>({
    .x:      RFloat(), // Rectangle top-left corner position x
    .y:      RFloat(), // Rectangle top-left corner position y
    .width:  RFloat(), // Rectangle width
    .height: RFloat(), // Rectangle height
  }),
);