Search
Preparing search index...
The search index is not available
gtools
Options
All
Public
Public/Protected
All
Inherited
Externals
Menu
gtools
dom/canvas-drawer
CanvasDrawer
Class CanvasDrawer
Hierarchy
CanvasDrawer
Implements
Drawer
Index
Constructors
constructor
Methods
add
Point
ToLine
clear
create
Ellipse
draw
Full
Canvas
Grid
draw
Image
draw
Line
draw
Path
draw
Text
fill
Arc
fill
Path
fill
Rect
fill
Rectangles
fill
Rotated
Text
fill
Rounded
Rect
fill
Text
fill
Vertical
Text
full
Canvas
Grid
horizontal
Line
horizontal
Lines
start
Drawing
Line
stroke
Arc
stroke
Rect
stroke
Rectangles
stroke
Rounded
Rect
vertical
Line
vertical
Lines
Constructors
constructor
new
Canvas
Drawer
(
context
:
CanvasRenderingContext2D
)
:
CanvasDrawer
Parameters
context:
CanvasRenderingContext2D
Returns
CanvasDrawer
Methods
add
Point
ToLine
add
Point
ToLine
(
x
:
number
, y
:
number
, stroke
?:
boolean
)
:
void
Parameters
x:
number
y:
number
stroke:
boolean
= true
Returns
void
clear
clear
(
resetTransform
?:
boolean
)
:
void
Parameters
resetTransform:
boolean
= true
Returns
void
Private
create
Ellipse
create
Ellipse
(
x
:
number
, y
:
number
, w
:
number
, h
:
number
)
:
void
Parameters
x:
number
y:
number
w:
number
h:
number
Returns
void
draw
Full
Canvas
Grid
draw
Full
Canvas
Grid
(
startX
:
number
, startY
:
number
, offset
:
number
, rows
:
number
, columns
:
number
)
:
void
Parameters
startX:
number
startY:
number
offset:
number
rows:
number
columns:
number
Returns
void
draw
Image
draw
Image
(
image
:
CanvasImageSource
, x
?:
number
, y
?:
number
, w
?:
number
, h
?:
number
)
:
void
Parameters
image:
CanvasImageSource
x:
number
= 0
y:
number
= ...
w:
number
= ...
h:
number
= ...
Returns
void
draw
Line
draw
Line
(
x1
:
number
, y1
:
number
, x2
:
number
, y2
:
number
, color
?:
ColorType
, width
?:
number
)
:
void
Parameters
x1:
number
y1:
number
x2:
number
y2:
number
Optional
color:
ColorType
width:
number
= ...
Returns
void
draw
Path
draw
Path
(
points
:
Readonly
<
SimpleVector2
>
[]
, color
?:
ColorType
, width
?:
number
, close
?:
boolean
)
:
void
Parameters
points:
Readonly
<
SimpleVector2
>
[]
Optional
color:
ColorType
width:
number
= ...
close:
boolean
= false
Returns
void
draw
Text
draw
Text
(
text
:
string
, x
:
number
, y
:
number
, w
:
number
, h
:
number
, textOptions
:
TextOptionsInterface
)
:
void
Parameters
text:
string
x:
number
y:
number
w:
number
h:
number
textOptions:
TextOptionsInterface
Returns
void
fill
Arc
fill
Arc
(
x
:
number
, y
:
number
, w
:
number
, h
:
number
, color
?:
ColorType
)
:
void
Parameters
x:
number
y:
number
w:
number
h:
number
Optional
color:
ColorType
Returns
void
fill
Path
fill
Path
(
points
:
Readonly
<
SimpleVector2
>
[]
, color
?:
ColorType
, close
?:
boolean
)
:
void
Parameters
points:
Readonly
<
SimpleVector2
>
[]
Optional
color:
ColorType
close:
boolean
= false
Returns
void
fill
Rect
fill
Rect
(
x
:
number
, y
:
number
, w
:
number
, h
:
number
, color
?:
ColorType
)
:
void
Parameters
x:
number
y:
number
w:
number
h:
number
Optional
color:
ColorType
Returns
void
fill
Rectangles
fill
Rectangles
(
data
:
[
x
:
number
,
y
:
number
,
w
:
number
,
h
:
number
]
[]
, color
?:
string
|
Color
)
:
void
Parameters
data:
[
x
:
number
,
y
:
number
,
w
:
number
,
h
:
number
]
[]
Optional
color:
string
|
Color
Returns
void
Private
fill
Rotated
Text
fill
Rotated
Text
(
text
:
string
, x
:
number
, y
:
number
, angle
:
number
, maxWidth
?:
number
)
:
void
Parameters
text:
string
x:
number
y:
number
angle:
number
Optional
maxWidth:
number
Returns
void
fill
Rounded
Rect
fill
Rounded
Rect
(
x
:
number
, y
:
number
, w
:
number
, h
:
number
, round
:
RoundData
, color
?:
ColorType
)
:
void
Parameters
x:
number
y:
number
w:
number
h:
number
round:
RoundData
Optional
color:
ColorType
Returns
void
fill
Text
fill
Text
(
text
:
string
, x
:
number
, y
:
number
, maxWidth
?:
number
)
:
void
Parameters
text:
string
x:
number
y:
number
Optional
maxWidth:
number
Returns
void
fill
Vertical
Text
fill
Vertical
Text
(
text
:
string
, x
:
number
, y
:
number
, maxWidth
?:
number
)
:
void
Parameters
text:
string
x:
number
y:
number
Optional
maxWidth:
number
Returns
void
full
Canvas
Grid
full
Canvas
Grid
(
startX
:
number
, startY
:
number
, offset
:
number
, rows
:
number
, columns
:
number
)
:
void
Parameters
startX:
number
startY:
number
offset:
number
rows:
number
columns:
number
Returns
void
horizontal
Line
horizontal
Line
(
y
:
number
, startX
?:
number
, endX
?:
number
)
:
void
Parameters
y:
number
startX:
number
= 0
endX:
number
= ...
Returns
void
horizontal
Lines
horizontal
Lines
(
startY
:
number
, offsetY
:
number
, steps
:
number
, startX
?:
number
, endX
?:
number
)
:
void
Parameters
startY:
number
offsetY:
number
steps:
number
startX:
number
= 0
endX:
number
= ...
Returns
void
start
Drawing
Line
start
Drawing
Line
(
x
:
number
, y
:
number
)
:
void
Parameters
x:
number
y:
number
Returns
void
stroke
Arc
stroke
Arc
(
x
:
number
, y
:
number
, w
:
number
, h
:
number
, color
?:
ColorType
, width
?:
number
)
:
void
Parameters
x:
number
y:
number
w:
number
h:
number
Optional
color:
ColorType
width:
number
= ...
Returns
void
stroke
Rect
stroke
Rect
(
x
:
number
, y
:
number
, w
:
number
, h
:
number
, color
?:
ColorType
, width
?:
number
)
:
void
Parameters
x:
number
y:
number
w:
number
h:
number
Optional
color:
ColorType
width:
number
= ...
Returns
void
stroke
Rectangles
stroke
Rectangles
(
data
:
[
x
:
number
,
y
:
number
,
w
:
number
,
h
:
number
]
[]
, color
?:
string
|
Color
, width
?:
number
)
:
void
Parameters
data:
[
x
:
number
,
y
:
number
,
w
:
number
,
h
:
number
]
[]
Optional
color:
string
|
Color
Optional
width:
number
Returns
void
stroke
Rounded
Rect
stroke
Rounded
Rect
(
x
:
number
, y
:
number
, w
:
number
, h
:
number
, round
:
RoundData
, color
?:
ColorType
, width
?:
number
)
:
void
Parameters
x:
number
y:
number
w:
number
h:
number
round:
RoundData
Optional
color:
ColorType
width:
number
= ...
Returns
void
vertical
Line
vertical
Line
(
x
:
number
, startY
?:
number
, endY
?:
number
)
:
void
Parameters
x:
number
startY:
number
= 0
endY:
number
= ...
Returns
void
vertical
Lines
vertical
Lines
(
startX
:
number
, offsetX
:
number
, steps
:
number
, startY
?:
number
, endY
?:
number
)
:
void
Parameters
startX:
number
offsetX:
number
steps:
number
startY:
number
= 0
endY:
number
= ...
Returns
void
Modules
dom/canvas-
drawer
Canvas
Drawer
constructor
add
Point
ToLine
clear
create
Ellipse
draw
Full
Canvas
Grid
draw
Image
draw
Line
draw
Path
draw
Text
fill
Arc
fill
Path
fill
Rect
fill
Rectangles
fill
Rotated
Text
fill
Rounded
Rect
fill
Text
fill
Vertical
Text
full
Canvas
Grid
horizontal
Line
horizontal
Lines
start
Drawing
Line
stroke
Arc
stroke
Rect
stroke
Rectangles
stroke
Rounded
Rect
vertical
Line
vertical
Lines
Color
Type
Generated using
TypeDoc