Skip to content
M2O Scripting APIScripting reference
Data shapeClient APIGenerated

RenderTargetCommand

Defined in: client/api.d.ts:625

One drawing operation inside a render target. Coordinates are pixels, with the origin at the top-left.

optional color?: Color

Defined in: client/api.d.ts:669

Tint, text colour, or fill colour; white by default.


optional filled?: boolean

Defined in: client/api.d.ts:674

Whether a rect or circle is filled; true by default.


optional fontSize?: number

Defined in: client/api.d.ts:694

Text size in pixels; the UI font size by default.


optional height?: number

Defined in: client/api.d.ts:649

Height of a rect or image.


optional radius?: number

Defined in: client/api.d.ts:664

Circle radius.


optional rounding?: number

Defined in: client/api.d.ts:684

Corner radius of a rect.


optional text?: string

Defined in: client/api.d.ts:689

The string a text command draws.


optional texture?: bigint | RenderTargetSurface

Defined in: client/api.d.ts:699

What an image command samples: a Texture.load result or another render target.


optional thickness?: number

Defined in: client/api.d.ts:679

Outline width for an unfilled rect, a circle, or a line.


type: "text" | "rect" | "image" | "line" | "circle"

Defined in: client/api.d.ts:629

Which primitive to draw.


optional u0?: number

Defined in: client/api.d.ts:709

Left texture coordinate of an image; 0 by default.


optional u1?: number

Defined in: client/api.d.ts:719

Right texture coordinate of an image; 1 by default.


optional v0?: number

Defined in: client/api.d.ts:714

Top texture coordinate of an image; 0 by default.


optional v1?: number

Defined in: client/api.d.ts:724

Bottom texture coordinate of an image; 1 by default.


optional webView?: number

Defined in: client/api.d.ts:704

A Web.createView id for an image command to sample, so a page draws into the target. Takes precedence over texture. Call Web.setViewOffscreen(id) first, or a hidden view stops painting.


optional width?: number

Defined in: client/api.d.ts:644

Width of a rect or image.


optional x?: number

Defined in: client/api.d.ts:634

Left edge, the first point of a line, or the centre of a circle.


optional x2?: number

Defined in: client/api.d.ts:654

Second point of a line.


optional y?: number

Defined in: client/api.d.ts:639

Top edge, the first point of a line, or the centre of a circle.


optional y2?: number

Defined in: client/api.d.ts:659

Second point of a line.