MCPcopy
hub / github.com/canvg/canvg / constructor

Method constructor

src/Document/TextPathElement.ts:60–71  ·  view source on GitHub ↗
(
    document: Document,
    node: HTMLElement,
    captureTextNodes?: boolean
  )

Source from the content-addressed store, hash-verified

58 private readonly measuresCache = new Map<string, number>([['', 0]])
59
60 constructor(
61 document: Document,
62 node: HTMLElement,
63 captureTextNodes?: boolean
64 ) {
65 super(document, node, captureTextNodes)
66
67 const pathElement = this.getHrefAttribute().getDefinition<PathElement>()
68
69 this.text = this.getTextFromNode()
70 this.dataArray = this.parsePathData(pathElement)
71 }
72
73 override getText() {
74 return this.text

Callers

nothing calls this directly

Calls 3

parsePathDataMethod · 0.95
getDefinitionMethod · 0.80
getTextFromNodeMethod · 0.80

Tested by

no test coverage detected