Type alias TextTextureOptions
TextTextureOptions: {
backgroundStyle?: string | CanvasGradient | CanvasPattern;
font?: string;
padding?: {
height?: number;
width?: number;
};
style?: string | CanvasGradient | CanvasPattern;
onBackground?(ctx, text, textMetrics) => unknown;
onText?(ctx, text, textMetrics) => unknown;
}
Type declaration
-
Optional
backgroundStyle?: string | CanvasGradient | CanvasPattern
-
Optional
font?: string
-
Optional
padding?: {
height?: number;
width?: number;
}
-
Optional
height?: number
-
Optional
width?: number
-
Optional
style?: string | CanvasGradient | CanvasPattern
-
onBackground?:function
- onBackground(ctx, text, textMetrics): unknown
-
Parameters
-
ctx: CanvasRenderingContext2D
-
text: string
-
textMetrics: TextMetrics
Returns unknown
-
onText?:function
- onText(ctx, text, textMetrics): unknown
-
Parameters
-
ctx: CanvasRenderingContext2D
-
text: string
-
textMetrics: TextMetrics
Returns unknown
background fillStyle