Skip to content

Documentation / @debuffjp/ui / DrawLike

Interface: DrawLike ​

Defined in: draw-like.ts:12

The parts of @debuffjp/core's Draw that ui uses. Structural, so ui has no dependencies.

Properties ​

alpha ​

alpha: number

Defined in: draw-like.ts:13

Methods ​

circle()? ​

optional circle(x, y, radius, color): void

Defined in: draw-like.ts:16

Filled circle. Optional: when present, panels with a radius get round corners.

Parameters ​

x ​

number

y ​

number

radius ​

number

color ​

string | number

Returns ​

void


measure() ​

measure(text, font?): object

Defined in: draw-like.ts:19

The box text() fills, in logical pixels.

Parameters ​

text ​

string

font? ​

FontLike

Returns ​

object

h ​

h: number

w ​

w: number


rect() ​

rect(x, y, w, h, color): void

Defined in: draw-like.ts:14

Parameters ​

x ​

number

y ​

number

w ​

number

h ​

number

color ​

string | number

Returns ​

void


text() ​

text(text, x, y, options?): void

Defined in: draw-like.ts:17

Parameters ​

text ​

string

x ​

number

y ​

number

options? ​

TextOptions

Returns ​

void