interface Painter { drawMultilineText(text: string,
font: number,
scale: number,
w: number): void; drawRect(w: number,
h: number): void; drawSprite(dict: string,
name: string,
w: number,
h: number): void; drawText(text: string,
font: number,
scale: number): void; getFontSize(font: number,
scale: number): number; getPosition(): Vector2; getTextLineCount(text: string,
font: number,
scale: number,
w: number): number; getTextWidth(text: string,
font: number,
scale: number): number; move(x: number,
y: number): void; setColor(r: number,
g: number,
b: number,
a: number): void; setPosition(x: number,
y: number): void; } Methods
drawMultilineText
- drawMultilineText(text, font, scale, w): void
Parameters
- text: string
- font: number
- scale: number
- w: number
Returns void
drawRect
- drawRect(w, h): void
Returns void
drawSprite
- drawSprite(dict, name, w, h): void
Parameters
- dict: string
- name: string
- w: number
- h: number
Returns void
drawText
- drawText(text, font, scale): void
Parameters
- text: string
- font: number
- scale: number
Returns void
getFontSize
- getFontSize(font, scale): number
Parameters
- font: number
- scale: number
Returns number
getTextLineCount
- getTextLineCount(text, font, scale, w): number
Parameters
- text: string
- font: number
- scale: number
- w: number
Returns number
getTextWidth
- getTextWidth(text, font, scale): number
Parameters
- text: string
- font: number
- scale: number
Returns number
move
- move(x, y): void
Returns void
setColor
- setColor(r, g, b, a): void
Parameters
- r: number
- g: number
- b: number
- a: number
Returns void
setPosition
- setPosition(x, y): void
Returns void