@@ -437,25 +437,20 @@ <h2><a id="drawing">Functions for Drawing</a></h2>
437
437
438
438
// Draw a text
439
439
// style can be "normal", "italic" and/or "bold"
440
- text(x, y, text, color? = 3, style = 'normal'): void
440
+ text(x, y, text, color? = 3, style? = 'normal'): void
441
441
442
442
// Sets the text alignment and baseline
443
443
// default values: align = 'start', baseline = 'top'
444
444
// see: https://developer.mozilla.org/en-US/docs/Web/API/CanvasRenderingContext2D/textAlign
445
445
// see: https://developer.mozilla.org/en-US/docs/Web/API/CanvasRenderingContext2D/textBaseline
446
- textalign(align: string, baseline: string): void
446
+ textalign(align? : string, baseline? : string): void
447
447
448
448
// Sets the font family for texts
449
449
textfont(fontName: string): void
450
450
451
451
// Sets the font size (default: 32)
452
452
textsize(size: number): void
453
453
454
- // Returns the text dimensions like width and height
455
- // when size is omitted, it will use the current
456
- // font size defined by textsize()
457
- textmetrics(text: string, size?: number)
458
-
459
454
/**
460
455
* IMAGE DRAWING-RELATED FUNCTIONS
461
456
*/
0 commit comments