Skip to main content

Class: GlyphElement

Hierarchy​

Properties​

ignoreChildTypes​

â–ª Static Readonly ignoreChildTypes: string[]

Inherited from​

PathElement.ignoreChildTypes

Defined in​

src/Document/Element.ts:11


attributes​

• Readonly attributes: Record<string, Property<unknown>> = {}

Inherited from​

PathElement.attributes

Defined in​

src/Document/Element.ts:14


styles​

• Readonly styles: Record<string, Property<unknown>> = {}

Inherited from​

PathElement.styles

Defined in​

src/Document/Element.ts:15


stylesSpecificity​

• Readonly stylesSpecificity: Record<string, string> = {}

Inherited from​

PathElement.stylesSpecificity

Defined in​

src/Document/Element.ts:16


animationFrozen​

• animationFrozen: boolean = false

Inherited from​

PathElement.animationFrozen

Defined in​

src/Document/Element.ts:17


animationFrozenValue​

• animationFrozenValue: string = ''

Inherited from​

PathElement.animationFrozenValue

Defined in​

src/Document/Element.ts:18


parent​

• parent: Element = null

Inherited from​

PathElement.parent

Defined in​

src/Document/Element.ts:19


children​

• children: Element[] = []

Inherited from​

PathElement.children

Defined in​

src/Document/Element.ts:20


document​

• Protected Readonly document: Document

Inherited from​

PathElement.document


node​

• Protected Optional Readonly node: HTMLElement

Inherited from​

PathElement.node


captureTextNodes​

• Protected Readonly captureTextNodes: boolean = false

Inherited from​

PathElement.captureTextNodes


type​

• type: string = 'glyph'

Overrides​

PathElement.type

Defined in​

src/Document/GlyphElement.ts:7


horizAdvX​

• Readonly horizAdvX: number

Defined in​

src/Document/GlyphElement.ts:8


unicode​

• Readonly unicode: string

Defined in​

src/Document/GlyphElement.ts:9


arabicForm​

• Readonly arabicForm: ArabicForm

Defined in​

src/Document/GlyphElement.ts:10


pathParser​

• Readonly pathParser: PathParser

Inherited from​

PathElement.pathParser

Defined in​

src/Document/PathElement.ts:18

Methods​

getAttribute​

â–¸ getAttribute(name, createIfNotExists?): Property<unknown>

Parameters​

NameTypeDefault value
namestringundefined
createIfNotExistsbooleanfalse

Returns​

Property<unknown>

Inherited from​

PathElement.getAttribute

Defined in​

src/Document/Element.ts:87


getHrefAttribute​

â–¸ getHrefAttribute(): Property<unknown>

Returns​

Property<unknown>

Inherited from​

PathElement.getHrefAttribute

Defined in​

src/Document/Element.ts:101


getStyle​

â–¸ getStyle(name, createIfNotExists?, skipAncestors?): Property<unknown>

Parameters​

NameTypeDefault value
namestringundefined
createIfNotExistsbooleanfalse
skipAncestorsbooleanfalse

Returns​

Property<unknown>

Inherited from​

PathElement.getStyle

Defined in​

src/Document/Element.ts:114


render​

â–¸ render(ctx): void

Parameters​

NameType
ctxRenderingContext2D

Returns​

void

Inherited from​

PathElement.render

Defined in​

src/Document/Element.ts:151


applyEffects​

â–¸ Protected applyEffects(ctx): void

Parameters​

NameType
ctxRenderingContext2D

Returns​

void

Inherited from​

PathElement.applyEffects

Defined in​

src/Document/Element.ts:190


addChild​

â–¸ Protected addChild(childNode): void

Parameters​

NameType
childNodeHTMLElement | Element

Returns​

void

Inherited from​

PathElement.addChild

Defined in​

src/Document/Element.ts:220


matchesSelector​

â–¸ Protected matchesSelector(selector): boolean

Parameters​

NameType
selectorstring

Returns​

boolean

Inherited from​

PathElement.matchesSelector

Defined in​

src/Document/Element.ts:232


addStylesFromStyleDefinition​

â–¸ addStylesFromStyleDefinition(): void

Returns​

void

Inherited from​

PathElement.addStylesFromStyleDefinition

Defined in​

src/Document/Element.ts:248


removeStyles​

â–¸ Protected removeStyles(element, ignoreStyles): [string, string][]

Parameters​

NameType
elementElement
ignoreStylesstring[]

Returns​

[string, string][]

Inherited from​

PathElement.removeStyles

Defined in​

src/Document/Element.ts:283


restoreStyles​

â–¸ Protected restoreStyles(element, styles): void

Parameters​

NameType
elementElement
styles[string, string][]

Returns​

void

Inherited from​

PathElement.restoreStyles

Defined in​

src/Document/Element.ts:301


isFirstChild​

â–¸ isFirstChild(): boolean

Returns​

boolean

Inherited from​

PathElement.isFirstChild

Defined in​

src/Document/Element.ts:307


path​

â–¸ path(ctx?): BoundingBox

Parameters​

NameType
ctx?RenderingContext2D

Returns​

BoundingBox

Inherited from​

PathElement.path

Defined in​

src/Document/PathElement.ts:30


getBoundingBox​

â–¸ getBoundingBox(_ctx): BoundingBox

Parameters​

NameType
_ctxRenderingContext2D

Returns​

BoundingBox

Inherited from​

PathElement.getBoundingBox

Defined in​

src/Document/PathElement.ts:89


getMarkers​

â–¸ getMarkers(): Marker[]

Returns​

Marker[]

Inherited from​

PathElement.getMarkers

Defined in​

src/Document/PathElement.ts:93


renderChildren​

â–¸ renderChildren(ctx): void

Parameters​

NameType
ctxRenderingContext2D

Returns​

void

Inherited from​

PathElement.renderChildren

Defined in​

src/Document/PathElement.ts:102


pathM​

â–¸ Static pathM(pathParser): Object

Parameters​

NameType
pathParserPathParser

Returns​

Object

NameType
pointPoint

Inherited from​

PathElement.pathM

Defined in​

src/Document/PathElement.ts:161


pathM​

â–¸ Protected pathM(ctx, boundingBox): void

Parameters​

NameType
ctxRenderingContext2D
boundingBoxBoundingBox

Returns​

void

Inherited from​

PathElement.pathM

Defined in​

src/Document/PathElement.ts:171


pathL​

â–¸ Static pathL(pathParser): Object

Parameters​

NameType
pathParserPathParser

Returns​

Object

NameType
currentPoint
pointPoint

Inherited from​

PathElement.pathL

Defined in​

src/Document/PathElement.ts:190


pathL​

â–¸ Protected pathL(ctx, boundingBox): void

Parameters​

NameType
ctxRenderingContext2D
boundingBoxBoundingBox

Returns​

void

Inherited from​

PathElement.pathL

Defined in​

src/Document/PathElement.ts:200


pathH​

â–¸ Static pathH(pathParser): Object

Parameters​

NameType
pathParserPathParser

Returns​

Object

NameType
currentPoint
pointPoint

Inherited from​

PathElement.pathH

Defined in​

src/Document/PathElement.ts:222


pathH​

â–¸ Protected pathH(ctx, boundingBox): void

Parameters​

NameType
ctxRenderingContext2D
boundingBoxBoundingBox

Returns​

void

Inherited from​

PathElement.pathH

Defined in​

src/Document/PathElement.ts:240


pathV​

â–¸ Static pathV(pathParser): Object

Parameters​

NameType
pathParserPathParser

Returns​

Object

NameType
currentPoint
pointPoint

Inherited from​

PathElement.pathV

Defined in​

src/Document/PathElement.ts:262


pathV​

â–¸ Protected pathV(ctx, boundingBox): void

Parameters​

NameType
ctxRenderingContext2D
boundingBoxBoundingBox

Returns​

void

Inherited from​

PathElement.pathV

Defined in​

src/Document/PathElement.ts:280


pathC​

â–¸ Static pathC(pathParser): Object

Parameters​

NameType
pathParserPathParser

Returns​

Object

NameType
currentPoint
pointPoint
controlPointPoint
currentPointPoint

Inherited from​

PathElement.pathC

Defined in​

src/Document/PathElement.ts:302


pathC​

â–¸ Protected pathC(ctx, boundingBox): void

Parameters​

NameType
ctxRenderingContext2D
boundingBoxBoundingBox

Returns​

void

Inherited from​

PathElement.pathC

Defined in​

src/Document/PathElement.ts:316


pathS​

â–¸ Static pathS(pathParser): Object

Parameters​

NameType
pathParserPathParser

Returns​

Object

NameType
currentPoint
pointPoint
controlPointPoint
currentPointPoint

Inherited from​

PathElement.pathS

Defined in​

src/Document/PathElement.ts:352


pathS​

â–¸ Protected pathS(ctx, boundingBox): void

Parameters​

NameType
ctxRenderingContext2D
boundingBoxBoundingBox

Returns​

void

Inherited from​

PathElement.pathS

Defined in​

src/Document/PathElement.ts:366


pathQ​

â–¸ Static pathQ(pathParser): Object

Parameters​

NameType
pathParserPathParser

Returns​

Object

NameType
currentPoint
controlPointPoint
currentPointPoint

Inherited from​

PathElement.pathQ

Defined in​

src/Document/PathElement.ts:402


pathQ​

â–¸ Protected pathQ(ctx, boundingBox): void

Parameters​

NameType
ctxRenderingContext2D
boundingBoxBoundingBox

Returns​

void

Inherited from​

PathElement.pathQ

Defined in​

src/Document/PathElement.ts:414


pathT​

â–¸ Static pathT(pathParser): Object

Parameters​

NameType
pathParserPathParser

Returns​

Object

NameType
currentPoint
controlPointPoint
currentPointPoint

Inherited from​

PathElement.pathT

Defined in​

src/Document/PathElement.ts:445


pathT​

â–¸ Protected pathT(ctx, boundingBox): void

Parameters​

NameType
ctxRenderingContext2D
boundingBoxBoundingBox

Returns​

void

Inherited from​

PathElement.pathT

Defined in​

src/Document/PathElement.ts:460


pathA​

â–¸ Static pathA(pathParser): Object

Parameters​

NameType
pathParserPathParser

Returns​

Object

NameType
currentPointPoint
rXnumber
rYnumber
sweepFlag0 | 1
xAxisRotationnumber
centpPoint
a1number
adnumber

Inherited from​

PathElement.pathA

Defined in​

src/Document/PathElement.ts:491


pathA​

â–¸ Protected pathA(ctx, boundingBox): void

Parameters​

NameType
ctxRenderingContext2D
boundingBoxBoundingBox

Returns​

void

Inherited from​

PathElement.pathA

Defined in​

src/Document/PathElement.ts:580


pathZ​

â–¸ Static pathZ(pathParser): void

Parameters​

NameType
pathParserPathParser

Returns​

void

Inherited from​

PathElement.pathZ

Defined in​

src/Document/PathElement.ts:622


pathZ​

â–¸ Protected pathZ(ctx, boundingBox): void

Parameters​

NameType
ctxRenderingContext2D
boundingBoxBoundingBox

Returns​

void

Inherited from​

PathElement.pathZ

Defined in​

src/Document/PathElement.ts:626


calculateOpacity​

â–¸ Protected calculateOpacity(): number

Returns​

number

Inherited from​

PathElement.calculateOpacity

Defined in​

src/Document/RenderedElement.ts:13


setContext​

â–¸ setContext(ctx, fromMeasure?): void

Parameters​

NameTypeDefault value
ctxRenderingContext2Dundefined
fromMeasurebooleanfalse

Returns​

void

Inherited from​

PathElement.setContext

Defined in​

src/Document/RenderedElement.ts:31


clearContext​

â–¸ clearContext(ctx): void

Parameters​

NameType
ctxRenderingContext2D

Returns​

void

Inherited from​

PathElement.clearContext

Defined in​

src/Document/RenderedElement.ts:215

Constructors​

constructor​

• new GlyphElement(document, node, captureTextNodes?)

Parameters​

NameType
documentDocument
nodeHTMLElement
captureTextNodes?boolean

Overrides​

PathElement.constructor

Defined in​

src/Document/GlyphElement.ts:12