Search…
ViewCanvas

Hierarchy

  • ViewCanvas

Index

Constructors

Properties

Methods

Constructors

constructor

+ new ViewCanvas(canvas: Canvas): ViewCanvas
Parameters:
Name
Type
canvas
Canvas
Returns: ViewCanvas

Properties

Protected Readonly canvas

canvas: Canvas

Readonly context

context: CanvasRenderingContext2D

Methods

drawPath

drawPath(paint: Paint): void
Parameters:
Name
Type
paint
Paint
Returns: void

drawRect

drawRect(rect: Rect, paint: Paint, borders?: Rect): void
Parameters:
Name
Type
rect
Rect
paint
Paint
borders?
Rect
Returns: void

drawText

drawText(x: number, y: number, text: string, paint: Paint, paintOverrides?: PaintOverrides, maxWidth: number): void
Parameters:
Name
Type
Default
x
number
-
y
number
-
text
string
-
paint
Paint
-
paintOverrides?
-
maxWidth
number
0
Returns: void

line

line(line: Line): void
Parameters:
Name
Type
line
Line
Returns: void

measureText

measureText(text: string, paint: Paint): TextMetrics
Parameters:
Name
Type
text
string
paint
Paint
Returns: TextMetrics

roundRect

roundRect(x: number, y: number, w: number, h: number, r: Radius): void
Parameters:
Name
Type
x
number
y
number
w
number
h
number
r
Radius
Returns: void

setPaint

setPaint(paint: Paint, paintOverrides?: PaintOverrides): void
Parameters:
Name
Type
paint
Paint
paintOverrides?
Returns: void
Export as PDF
Copy link
On this page
Hierarchy
Index
Constructors
Properties
Methods
Constructors
constructor
Properties
Protected Readonly canvas
Readonly context
Methods
drawPath
drawRect
drawText
line
measureText
roundRect
setPaint