Preparing search index...
The search index is not available
@xpadev-net/niconicomments
@xpadev-net/niconicomments
renderer/canvas
CanvasRenderer
Class CanvasRenderer
Canvasを使ったレンダラー dom/canvas周りのAPIを切り出したもの
Param: canvas
レンダリング先のCanvas
Param: video
レンダリングするVideo(任意)
Implements
IRenderer
Index
Constructors
constructor
Properties
canvas
context
video?
Methods
begin
Path
clear
Rect
close
Path
destroy
draw
Image
draw
Video
fill
Rect
fill
Text
get
Canvas
get
Fill
Style
get
Font
get
Size
line
To
measure
Text
move
To
quadratic
Curve
To
restore
save
set
Fill
Style
set
Font
set
Global
Alpha
set
Line
Width
set
Scale
set
Size
set
Stroke
Style
stroke
stroke
Rect
stroke
Text
Constructors
constructor
new
Canvas
Renderer
(
canvas
?
,
video
?
)
:
CanvasRenderer
Parameters
Optional
canvas
:
HTMLCanvasElement
Optional
video
:
HTMLVideoElement
Returns
CanvasRenderer
Properties
Readonly
canvas
canvas
:
HTMLCanvasElement
Private
Readonly
context
context
:
CanvasRenderingContext2D
Optional
Readonly
video
video
?:
HTMLVideoElement
Methods
begin
Path
begin
Path
(
)
:
void
Returns
void
clear
Rect
clear
Rect
(
x
,
y
,
width
,
height
)
:
void
Parameters
x
:
number
y
:
number
width
:
number
height
:
number
Returns
void
close
Path
close
Path
(
)
:
void
Returns
void
destroy
destroy
(
)
:
void
Returns
void
draw
Image
draw
Image
(
image
,
x
,
y
,
width
?
,
height
?
)
:
void
Parameters
image
:
IRenderer
x
:
number
y
:
number
Optional
width
:
number
Optional
height
:
number
Returns
void
draw
Video
draw
Video
(
enableLegacyPip
)
:
void
Parameters
enableLegacyPip
:
boolean
Returns
void
fill
Rect
fill
Rect
(
x
,
y
,
width
,
height
)
:
void
Parameters
x
:
number
y
:
number
width
:
number
height
:
number
Returns
void
fill
Text
fill
Text
(
text
,
x
,
y
)
:
void
Parameters
text
:
string
x
:
number
y
:
number
Returns
void
get
Canvas
get
Canvas
(
)
:
IRenderer
Returns
IRenderer
get
Fill
Style
get
Fill
Style
(
)
:
string
|
CanvasGradient
|
CanvasPattern
Returns
string
|
CanvasGradient
|
CanvasPattern
get
Font
get
Font
(
)
:
string
Returns
string
get
Size
get
Size
(
)
:
{
height
:
number
;
width
:
number
;
}
Returns
{
height
:
number
;
width
:
number
;
}
height
:
number
width
:
number
line
To
line
To
(
x
,
y
)
:
void
Parameters
x
:
number
y
:
number
Returns
void
measure
Text
measure
Text
(
text
)
:
TextMetrics
Parameters
text
:
string
Returns
TextMetrics
move
To
move
To
(
x
,
y
)
:
void
Parameters
x
:
number
y
:
number
Returns
void
quadratic
Curve
To
quadratic
Curve
To
(
cpx
,
cpy
,
x
,
y
)
:
void
Parameters
cpx
:
number
cpy
:
number
x
:
number
y
:
number
Returns
void
restore
restore
(
)
:
void
Returns
void
save
save
(
)
:
void
Returns
void
set
Fill
Style
set
Fill
Style
(
color
)
:
void
Parameters
color
:
string
Returns
void
set
Font
set
Font
(
font
)
:
void
Parameters
font
:
string
Returns
void
set
Global
Alpha
set
Global
Alpha
(
alpha
)
:
void
Parameters
alpha
:
number
Returns
void
set
Line
Width
set
Line
Width
(
width
)
:
void
Parameters
width
:
number
Returns
void
set
Scale
set
Scale
(
scale
,
arg1
?
)
:
void
Parameters
scale
:
number
Optional
arg1
:
number
Returns
void
set
Size
set
Size
(
width
,
height
)
:
void
Parameters
width
:
number
height
:
number
Returns
void
set
Stroke
Style
set
Stroke
Style
(
color
)
:
void
Parameters
color
:
string
Returns
void
stroke
stroke
(
)
:
void
Returns
void
stroke
Rect
stroke
Rect
(
x
,
y
,
width
,
height
)
:
void
Parameters
x
:
number
y
:
number
width
:
number
height
:
number
Returns
void
stroke
Text
stroke
Text
(
text
,
x
,
y
)
:
void
Parameters
text
:
string
x
:
number
y
:
number
Returns
void
Settings
Member Visibility
Protected
Private
Inherited
External
Theme
OS
Light
Dark
On This Page
constructor
canvas
context
video
begin
Path
clear
Rect
close
Path
destroy
draw
Image
draw
Video
fill
Rect
fill
Text
get
Canvas
get
Fill
Style
get
Font
get
Size
line
To
measure
Text
move
To
quadratic
Curve
To
restore
save
set
Fill
Style
set
Font
set
Global
Alpha
set
Line
Width
set
Scale
set
Size
set
Stroke
Style
stroke
stroke
Rect
stroke
Text
@xpadev-net/niconicomments
Loading...
Canvasを使ったレンダラー dom/canvas周りのAPIを切り出したもの
Param: canvas
レンダリング先のCanvas
Param: video
レンダリングするVideo(任意)