Preparing search index...
The search index is not available
libpag
libpag
wechat/scaler-context
ScalerContext
Class ScalerContext
Hierarchy
ScalerContext
ScalerContext
Index
Properties
canvas
context
Methods
set
Canvas
set
Context
is
Emoji
generate
Image
font
String
get
Text
Advance
get
Text
Bounds
generate
Font
Metrics
load
Canvas
Constructors
constructor
Properties
Static
canvas
canvas
:
HTMLCanvasElement
|
OffscreenCanvas
Static
context
context
:
OffscreenCanvasRenderingContext2D
|
CanvasRenderingContext2D
Methods
Static
set
Canvas
set
Canvas
(
canvas
:
HTMLCanvasElement
|
OffscreenCanvas
)
:
void
Parameters
canvas:
HTMLCanvasElement
|
OffscreenCanvas
Returns
void
Static
set
Context
set
Context
(
context
:
OffscreenCanvasRenderingContext2D
|
CanvasRenderingContext2D
)
:
void
Parameters
context:
OffscreenCanvasRenderingContext2D
|
CanvasRenderingContext2D
Returns
void
Static
is
Emoji
is
Emoji
(
text
:
string
)
:
boolean
Parameters
text:
string
Returns
boolean
generate
Image
generate
Image
(
text
:
string
, bounds
:
Rect
)
:
OffscreenCanvas
Parameters
text:
string
bounds:
Rect
Returns
OffscreenCanvas
font
String
font
String
(
)
:
string
Returns
string
get
Text
Advance
get
Text
Advance
(
text
:
string
)
:
number
Parameters
text:
string
Returns
number
get
Text
Bounds
get
Text
Bounds
(
text
:
string
)
:
Rect
Parameters
text:
string
Returns
Rect
generate
Font
Metrics
generate
Font
Metrics
(
)
:
{
ascent
:
number
;
descent
:
number
;
xHeight
:
number
;
capHeight
:
number
;
}
Returns
{
ascent
:
number
;
descent
:
number
;
xHeight
:
number
;
capHeight
:
number
;
}
ascent
:
number
descent
:
number
x
Height
:
number
cap
Height
:
number
Protected
load
Canvas
load
Canvas
(
)
:
void
Returns
void
Constructors
constructor
new
Scaler
Context
(
fontName
:
string
, fontStyle
:
string
, size
:
number
, fauxBold
?:
boolean
, fauxItalic
?:
boolean
)
:
ScalerContext
Parameters
fontName:
string
fontStyle:
string
size:
number
fauxBold:
boolean
= false
fauxItalic:
boolean
= false
Returns
ScalerContext
Settings
Member Visibility
Protected
Private
Inherited
External
Theme
OS
Light
Dark
Modules
libpag
binding
constant
core/backend-
context
core/bitmap-
image
core/global-
canvas
core/matrix
core/render-
canvas
core/scaler-
context
core/video-
reader
core/web-
mask
interfaces
pag-
composition
pag-
file
pag-
font
pag-
image-
layer
pag-
image
pag-
layer
pag-
module
pag-
player
pag-
solid-
layer
pag-
surface
pag-
text-
layer
pag-
view
pag
tgfx
types
utils/buffer
utils/canvas
utils/clock
utils/common
utils/decorators
utils/event-
manager
utils/font-
family
utils/measure-
text
utils/mixin
utils/queue
utils/type-
utils
utils/ua
utils/video-
listener
wechat/array-
buffer-
image
wechat/babel
wechat/binding
wechat/canvas
wechat/constant
wechat/file-
utils
wechat/interfaces
wechat/pag-
file
wechat/pag-
font
wechat/pag-
image
wechat/pag-
view
wechat/pag
wechat/scaler-
context
wechat/tgfx
wechat/video-
reader
wechat/web-
mask
worker/client
worker/events
worker/pag-
file
worker/pag-
image
worker/pag-
view
worker/utils
worker/video-
reader
worker/worker
Scaler
Context
canvas
context
set
Canvas
set
Context
is
Emoji
constructor
generate
Image
font
String
get
Text
Advance
get
Text
Bounds
generate
Font
Metrics
load
Canvas
Generated using
TypeDoc