Preparing search index...
The search index is not available
sparkengineweb
sparkengineweb
CanvasDevice
Class CanvasDevice
Index
Constructors
constructor
Properties
default
Stroke
Thickness
Methods
begin
clear
draw
Image
draw
Rect
end
fill
set
Blend
Method
set
Resolution
set
Transform
stroke
Constructors
constructor
new
Canvas
Device
(
)
:
CanvasDevice
Returns
CanvasDevice
Properties
default
Stroke
Thickness
default
Stroke
Thickness
:
number
= 1
Methods
begin
begin
(
ctx
)
:
void
Parameters
ctx
:
CanvasRenderingContext2D
Returns
void
clear
clear
(
ctx
,
color
?
)
:
void
Parameters
ctx
:
CanvasRenderingContext2D
Optional
color
:
string
Returns
void
draw
Image
draw
Image
(
ctx
,
image
,
x
,
y
,
width
,
height
,
opacity
?
)
:
void
Parameters
ctx
:
CanvasRenderingContext2D
image
:
ImageBitmap
x
:
number
y
:
number
width
:
number
height
:
number
opacity
:
number
= 100
Returns
void
draw
Rect
draw
Rect
(
ctx
,
x
,
y
,
width
,
height
)
:
void
Parameters
ctx
:
CanvasRenderingContext2D
x
:
number
y
:
number
width
:
number
height
:
number
Returns
void
end
end
(
ctx
)
:
void
Parameters
ctx
:
CanvasRenderingContext2D
Returns
void
fill
fill
(
ctx
,
color
?
)
:
void
Parameters
ctx
:
CanvasRenderingContext2D
Optional
color
:
string
Returns
void
set
Blend
Method
set
Blend
Method
(
ctx
,
method
)
:
void
Parameters
ctx
:
CanvasRenderingContext2D
method
:
BlendMethod
Returns
void
set
Resolution
set
Resolution
(
ctx
,
width
,
height
)
:
void
Parameters
ctx
:
CanvasRenderingContext2D
width
:
number
height
:
number
Returns
void
set
Transform
set
Transform
(
ctx
,
matrix
)
:
void
Parameters
ctx
:
CanvasRenderingContext2D
matrix
:
Matrix2D
Returns
void
stroke
stroke
(
ctx
,
color
?
,
thickness
?
)
:
void
Parameters
ctx
:
CanvasRenderingContext2D
Optional
color
:
string
Optional
thickness
:
number
Returns
void
Settings
Member Visibility
Protected
Inherited
External
Theme
OS
Light
Dark
On This Page
Constructors
constructor
Properties
default
Stroke
Thickness
Methods
begin
clear
draw
Image
draw
Rect
end
fill
set
Blend
Method
set
Resolution
set
Transform
stroke
sparkengineweb
Loading...