Revert "Remove IGlyphIdentifier in-between object"

This reverts commit 04f2d52f26.
This commit is contained in:
Daniel Imms
2018-09-17 07:37:04 -07:00
parent 00af63b271
commit 4656bd433c
6 changed files with 59 additions and 99 deletions
+4 -15
View File
@@ -3,6 +3,8 @@
* @license MIT
*/
import { IGlyphIdentifier } from './Types';
export default abstract class BaseCharAtlas {
private _didWarmUp: boolean = false;
@@ -37,27 +39,14 @@ export default abstract class BaseCharAtlas {
* do nothing and return false in that case.
*
* @param ctx Where to draw the character onto.
* @param chars The character(s) to draw. This is typically a single character bug can be made up
* of multiple when character joiners are used.
* @param code The character code.
* @param bg The background color.
* @param fg The foreground color.
* @param bold Whether the text is bold.
* @param dim Whether the text is dim.
* @param italic Whether the text is italic.
* @param glyph Information about what to draw
* @param x The position on the context to start drawing at
* @param y The position on the context to start drawing at
* @returns The success state. True if we drew the character.
*/
public abstract draw(
ctx: CanvasRenderingContext2D,
chars: string,
code: number,
bg: number,
fg: number,
bold: boolean,
dim: boolean,
italic: boolean,
glyph: IGlyphIdentifier,
x: number,
y: number
): boolean;