Search
Preparing search index...
The search index is not available
gtools
Options
All
Public
Public/Protected
All
Inherited
Externals
Menu
gtools
dom/canvas-manager
CanvasManager
Class CanvasManager
Hierarchy
AbstractCanvasManager
CanvasManager
Index
Constructors
constructor
Accessors
canvas
context
Methods
append
To
clear
Canvas
get
Image
set
Canvas
Size
set
Shadow
set
Transform
set
Transform
Raw
show
calc
Text
Width
canvas
ToImage
clear
Canvas
image
ToCanvas
set
Canvas
Size
set
Line
Dash
set
Shadow
set
Transform
Raw
Constructors
constructor
new
Canvas
Manager
(
arg1
:
HTMLImageElement
|
HTMLCanvasElement
, arg2
:
number
, arg3
:
number
)
:
CanvasManager
Parameters
arg1:
HTMLImageElement
|
HTMLCanvasElement
arg2:
number
arg3:
number
Returns
CanvasManager
Accessors
canvas
get
canvas
(
)
:
HTMLCanvasElement
Returns
HTMLCanvasElement
context
get
context
(
)
:
null
|
CanvasRenderingContext2D
Returns
null
|
CanvasRenderingContext2D
Methods
append
To
append
To
(
element
:
Element
)
:
Element
Parameters
element:
Element
Returns
Element
clear
Canvas
clear
Canvas
(
)
:
void
Returns
void
get
Image
get
Image
(
)
:
HTMLImageElement
Returns
HTMLImageElement
set
Canvas
Size
set
Canvas
Size
(
width
?:
number
, height
?:
number
)
:
void
Parameters
width:
number
= ...
height:
number
= ...
Returns
void
set
Shadow
set
Shadow
(
x
:
number
, y
:
number
, color
:
string
, blur
:
number
)
:
void
Parameters
x:
number
y:
number
color:
string
blur:
number
Returns
void
set
Transform
set
Transform
(
transform
:
Transform2D
)
:
void
Parameters
transform:
Transform2D
Returns
void
set
Transform
Raw
set
Transform
Raw
(
translationX
:
number
, translationY
:
number
, scaleX
:
number
, scaleY
?:
number
)
:
void
Parameters
translationX:
number
translationY:
number
scaleX:
number
scaleY:
number
= ...
Returns
void
show
show
(
format
?:
string
)
:
void
Parameters
format:
string
= "image/png"
Returns
void
Static
calc
Text
Width
calc
Text
Width
(
ctx
:
CanvasRenderingContext2D
, value
:
string
, font
?:
string
)
:
number
Parameters
ctx:
CanvasRenderingContext2D
value:
string
Optional
font:
string
Returns
number
Static
canvas
ToImage
canvas
ToImage
(
canvas
:
HTMLCanvasElement
, format
?:
string
)
:
HTMLImageElement
Parameters
canvas:
HTMLCanvasElement
format:
string
= "image/png"
Returns
HTMLImageElement
Static
clear
Canvas
clear
Canvas
(
ctx
:
CanvasRenderingContext2D
)
:
void
Parameters
ctx:
CanvasRenderingContext2D
Returns
void
Static
image
ToCanvas
image
ToCanvas
(
image
:
HTMLImageElement
)
:
HTMLCanvasElement
Parameters
image:
HTMLImageElement
Returns
HTMLCanvasElement
Static
set
Canvas
Size
set
Canvas
Size
(
canvas
:
HTMLCanvasElement
, width
?:
number
, height
?:
number
)
:
void
Parameters
canvas:
HTMLCanvasElement
width:
number
= ...
height:
number
= ...
Returns
void
Static
set
Line
Dash
set
Line
Dash
(
ctx
:
CanvasRenderingContext2D
,
...
args
:
number
[]
)
:
void
Parameters
ctx:
CanvasRenderingContext2D
Rest
...
args:
number
[]
Returns
void
Static
set
Shadow
set
Shadow
(
ctx
:
CanvasRenderingContext2D
, x
:
number
, y
:
number
, color
:
string
, blur
:
number
)
:
void
Parameters
ctx:
CanvasRenderingContext2D
x:
number
y:
number
color:
string
blur:
number
Returns
void
Static
set
Transform
Raw
set
Transform
Raw
(
ctx
:
CanvasRenderingContext2D
, translationX
:
number
, translationY
:
number
, scaleX
:
number
, scaleY
?:
number
)
:
void
Parameters
ctx:
CanvasRenderingContext2D
translationX:
number
translationY:
number
scaleX:
number
scaleY:
number
= ...
Returns
void
Modules
dom/canvas-
manager
Canvas
Manager
constructor
canvas
context
append
To
clear
Canvas
get
Image
set
Canvas
Size
set
Shadow
set
Transform
set
Transform
Raw
show
calc
Text
Width
canvas
ToImage
clear
Canvas
image
ToCanvas
set
Canvas
Size
set
Line
Dash
set
Shadow
set
Transform
Raw
Generated using
TypeDoc