Quad
Solid-colour rectangles and lines.
ts
import { Quad } from "willow";Quad
ts
class Quad extends NodeExtends Node.
Solid-colour quad (no texture). Useful for primitives and tests.
Quad: constructors
ts
new Quad(width: float, height: float)
new Quad(width: float, height: float, color: Color)Quad: properties
| Member | Description |
|---|---|
color: Color | Equivalent to quad.color = color. Solid fill colour, a Color. |
height: float | Quad height in pixels (authored base size). |
width: float | Quad width in pixels (authored base size). |
Quad: methods
| Member | Description |
|---|---|
setColor(color: Color): void | Equivalent to quad.color = color. Solid fill colour. |
Quad: static methods
| Member | Description |
|---|---|
static line(x1: float, y1: float, x2: float, y2: float, thickness: float, color: Color): Quad | Creates a solid-colour line segment from (x1, y1) to (x2, y2) with the given thickness. |