Methods
border
- border(x: number, y: number, width: number, height: number, color: string, borderWidth: number): void
-
Parameters
-
x: number
-
y: number
-
width: number
-
height: number
-
color: string
-
borderWidth: number
Returns void
line
- line(x1: number, y1: number, x2: number, y2: number, color?: string, width?: number): void
-
Parameters
-
x1: number
-
y1: number
-
x2: number
-
y2: number
-
Optional color: string
-
Optional width: number
Returns void
roundRect
- roundRect(x: number, y: number, width: number, height: number, radius?: number, fillStyle?: string, strokeStyle?: string, strokeWidth?: number): void
-
Parameters
-
x: number
-
y: number
-
width: number
-
height: number
-
Optional radius: number
-
Optional fillStyle: string
-
Optional strokeStyle: string
-
Optional strokeWidth: number
Returns void
text
- text(x: number, y: number, text: string, color?: string, xAlign?: string, yAlign?: string, size?: number, style?: string, font?: string): TextMetrics
-
Parameters
-
x: number
-
y: number
-
text: string
-
Optional color: string
-
Optional xAlign: string
-
Optional yAlign: string
-
Optional size: number
-
Optional style: string
-
Optional font: string
Returns TextMetrics
textMaxWidth
- textMaxWidth(x: number, y: number, text: string, maxWidth: number, color?: string, xAlign?: string, yAlign?: string, size?: number, style?: string, font?: string): void
-
Parameters
-
x: number
-
y: number
-
text: string
-
maxWidth: number
-
Optional color: string
-
Optional xAlign: string
-
Optional yAlign: string
-
Optional size: number
-
Optional style: string
-
Optional font: string
Returns void
Draws border (always transparent rectangle, just 4 lines)