Class: PathElement
Hierarchy​
↳
PathElement
↳↳
RectElement
↳↳
CircleElement
↳↳
EllipseElement
↳↳
LineElement
↳↳
PolylineElement
↳↳
GlyphElement
Constructors​
constructor​
• new PathElement(document
, node?
, captureTextNodes?
)
Parameters​
Name | Type |
---|---|
document | Document |
node? | HTMLElement |
captureTextNodes? | boolean |
Overrides​
Defined in​
src/Document/PathElement.ts:20
Properties​
ignoreChildTypes​
â–ª Static
Readonly
ignoreChildTypes: string
[]
Inherited from​
RenderedElement.ignoreChildTypes
Defined in​
attributes​
• Readonly
attributes: Record
<string
, Property
<unknown
>> = {}
Inherited from​
Defined in​
styles​
• Readonly
styles: Record
<string
, Property
<unknown
>> = {}
Inherited from​
Defined in​
stylesSpecificity​
• Readonly
stylesSpecificity: Record
<string
, string
> = {}
Inherited from​
RenderedElement.stylesSpecificity
Defined in​
animationFrozen​
• animationFrozen: boolean
= false
Inherited from​
RenderedElement.animationFrozen
Defined in​
animationFrozenValue​
• animationFrozenValue: string
= ''
Inherited from​
RenderedElement.animationFrozenValue
Defined in​
parent​
• parent: Element
= null
Inherited from​
Defined in​
children​
• children: Element
[] = []
Inherited from​
Defined in​
document​
• Protected
Readonly
document: Document
Inherited from​
Defined in​
node​
• Protected
Optional
Readonly
node: HTMLElement
Inherited from​
Defined in​
captureTextNodes​
• Protected
Readonly
captureTextNodes: boolean
= false
Inherited from​
RenderedElement.captureTextNodes
Defined in​
type​
• type: string
= 'path'
Overrides​
Defined in​
src/Document/PathElement.ts:17
pathParser​
• Readonly
pathParser: PathParser
Defined in​
src/Document/PathElement.ts:18
Methods​
getAttribute​
â–¸ getAttribute(name
, createIfNotExists?
): Property
<unknown
>
Parameters​
Name | Type | Default value |
---|---|---|
name | string | undefined |
createIfNotExists | boolean | false |
Returns​
Property
<unknown
>
Inherited from​
Defined in​
getHrefAttribute​
â–¸ getHrefAttribute(): Property
<unknown
>
Returns​
Property
<unknown
>
Inherited from​
RenderedElement.getHrefAttribute
Defined in​
getStyle​
â–¸ getStyle(name
, createIfNotExists?
, skipAncestors?
): Property
<unknown
>
Parameters​
Name | Type | Default value |
---|---|---|
name | string | undefined |
createIfNotExists | boolean | false |
skipAncestors | boolean | false |
Returns​
Property
<unknown
>
Inherited from​
Defined in​
render​
â–¸ render(ctx
): void
Parameters​
Name | Type |
---|---|
ctx | RenderingContext2D |
Returns​
void
Inherited from​
Defined in​
applyEffects​
â–¸ Protected
applyEffects(ctx
): void
Parameters​
Name | Type |
---|---|
ctx | RenderingContext2D |
Returns​
void
Inherited from​
Defined in​
addChild​
â–¸ Protected
addChild(childNode
): void
Parameters​
Name | Type |
---|---|
childNode | HTMLElement | Element |
Returns​
void
Inherited from​
Defined in​
matchesSelector​
â–¸ Protected
matchesSelector(selector
): boolean
Parameters​
Name | Type |
---|---|
selector | string |
Returns​
boolean
Inherited from​
RenderedElement.matchesSelector
Defined in​
addStylesFromStyleDefinition​
â–¸ addStylesFromStyleDefinition(): void
Returns​
void
Inherited from​
RenderedElement.addStylesFromStyleDefinition
Defined in​
removeStyles​
â–¸ Protected
removeStyles(element
, ignoreStyles
): [string
, string
][]
Parameters​
Name | Type |
---|---|
element | Element |
ignoreStyles | string [] |
Returns​
[string
, string
][]
Inherited from​
Defined in​
restoreStyles​
â–¸ Protected
restoreStyles(element
, styles
): void
Parameters​
Name | Type |
---|---|
element | Element |
styles | [string , string ][] |
Returns​
void
Inherited from​
Defined in​
isFirstChild​
â–¸ isFirstChild(): boolean
Returns​
boolean
Inherited from​
Defined in​
path​
â–¸ path(ctx?
): BoundingBox
Parameters​
Name | Type |
---|---|
ctx? | RenderingContext2D |
Returns​
Defined in​
src/Document/PathElement.ts:30
getBoundingBox​
â–¸ getBoundingBox(_ctx
): BoundingBox
Parameters​
Name | Type |
---|---|
_ctx | RenderingContext2D |
Returns​
Defined in​
src/Document/PathElement.ts:89
getMarkers​
â–¸ getMarkers(): Marker
[]
Returns​
Marker
[]
Defined in​
src/Document/PathElement.ts:93
renderChildren​
â–¸ renderChildren(ctx
): void
Parameters​
Name | Type |
---|---|
ctx | RenderingContext2D |
Returns​
void
Overrides​
RenderedElement.renderChildren
Defined in​
src/Document/PathElement.ts:102
pathM​
â–¸ Static
pathM(pathParser
): Object
Parameters​
Name | Type |
---|---|
pathParser | PathParser |
Returns​
Object
Name | Type |
---|---|
point | Point |
Defined in​
src/Document/PathElement.ts:161
pathM​
â–¸ Protected
pathM(ctx
, boundingBox
): void
Parameters​
Name | Type |
---|---|
ctx | RenderingContext2D |
boundingBox | BoundingBox |
Returns​
void
Defined in​
src/Document/PathElement.ts:171
pathL​
â–¸ Static
pathL(pathParser
): Object
Parameters​
Name | Type |
---|---|
pathParser | PathParser |
Returns​
Object
Name | Type |
---|---|
current | Point |
point | Point |
Defined in​
src/Document/PathElement.ts:190
pathL​
â–¸ Protected
pathL(ctx
, boundingBox
): void
Parameters​
Name | Type |
---|---|
ctx | RenderingContext2D |
boundingBox | BoundingBox |
Returns​
void
Defined in​
src/Document/PathElement.ts:200
pathH​
â–¸ Static
pathH(pathParser
): Object
Parameters​
Name | Type |
---|---|
pathParser | PathParser |
Returns​
Object
Name | Type |
---|---|
current | Point |
point | Point |
Defined in​
src/Document/PathElement.ts:222
pathH​
â–¸ Protected
pathH(ctx
, boundingBox
): void
Parameters​
Name | Type |
---|---|
ctx | RenderingContext2D |
boundingBox | BoundingBox |
Returns​
void
Defined in​
src/Document/PathElement.ts:240
pathV​
â–¸ Static
pathV(pathParser
): Object
Parameters​
Name | Type |
---|---|
pathParser | PathParser |
Returns​
Object
Name | Type |
---|---|
current | Point |
point | Point |
Defined in​
src/Document/PathElement.ts:262
pathV​
â–¸ Protected
pathV(ctx
, boundingBox
): void
Parameters​
Name | Type |
---|---|
ctx | RenderingContext2D |
boundingBox | BoundingBox |
Returns​
void
Defined in​
src/Document/PathElement.ts:280
pathC​
â–¸ Static
pathC(pathParser
): Object
Parameters​
Name | Type |
---|---|
pathParser | PathParser |
Returns​
Object
Name | Type |
---|---|
current | Point |
point | Point |
controlPoint | Point |
currentPoint | Point |
Defined in​
src/Document/PathElement.ts:302
pathC​
â–¸ Protected
pathC(ctx
, boundingBox
): void
Parameters​
Name | Type |
---|---|
ctx | RenderingContext2D |
boundingBox | BoundingBox |
Returns​
void
Defined in​
src/Document/PathElement.ts:316
pathS​
â–¸ Static
pathS(pathParser
): Object
Parameters​
Name | Type |
---|---|
pathParser | PathParser |
Returns​
Object
Name | Type |
---|---|
current | Point |
point | Point |
controlPoint | Point |
currentPoint | Point |
Defined in​
src/Document/PathElement.ts:352
pathS​
â–¸ Protected
pathS(ctx
, boundingBox
): void
Parameters​
Name | Type |
---|---|
ctx | RenderingContext2D |
boundingBox | BoundingBox |
Returns​
void
Defined in​
src/Document/PathElement.ts:366
pathQ​
â–¸ Static
pathQ(pathParser
): Object
Parameters​
Name | Type |
---|---|
pathParser | PathParser |
Returns​
Object
Name | Type |
---|---|
current | Point |
controlPoint | Point |
currentPoint | Point |
Defined in​
src/Document/PathElement.ts:402
pathQ​
â–¸ Protected
pathQ(ctx
, boundingBox
): void
Parameters​
Name | Type |
---|---|
ctx | RenderingContext2D |
boundingBox | BoundingBox |
Returns​
void
Defined in​
src/Document/PathElement.ts:414
pathT​
â–¸ Static
pathT(pathParser
): Object
Parameters​
Name | Type |
---|---|
pathParser | PathParser |
Returns​
Object
Name | Type |
---|---|
current | Point |
controlPoint | Point |
currentPoint | Point |
Defined in​
src/Document/PathElement.ts:445
pathT​
â–¸ Protected
pathT(ctx
, boundingBox
): void
Parameters​
Name | Type |
---|---|
ctx | RenderingContext2D |
boundingBox | BoundingBox |
Returns​
void
Defined in​
src/Document/PathElement.ts:460
pathA​
â–¸ Static
pathA(pathParser
): Object
Parameters​
Name | Type |
---|---|
pathParser | PathParser |
Returns​
Object
Name | Type |
---|---|
currentPoint | Point |
rX | number |
rY | number |
sweepFlag | 0 | 1 |
xAxisRotation | number |
centp | Point |
a1 | number |
ad | number |
Defined in​
src/Document/PathElement.ts:491
pathA​
â–¸ Protected
pathA(ctx
, boundingBox
): void
Parameters​
Name | Type |
---|---|
ctx | RenderingContext2D |
boundingBox | BoundingBox |
Returns​
void
Defined in​
src/Document/PathElement.ts:580
pathZ​
â–¸ Static
pathZ(pathParser
): void
Parameters​
Name | Type |
---|---|
pathParser | PathParser |
Returns​
void
Defined in​
src/Document/PathElement.ts:622
pathZ​
â–¸ Protected
pathZ(ctx
, boundingBox
): void
Parameters​
Name | Type |
---|---|
ctx | RenderingContext2D |
boundingBox | BoundingBox |
Returns​
void
Defined in​
src/Document/PathElement.ts:626
calculateOpacity​
â–¸ Protected
calculateOpacity(): number
Returns​
number
Inherited from​
RenderedElement.calculateOpacity
Defined in​
src/Document/RenderedElement.ts:13
setContext​
â–¸ setContext(ctx
, fromMeasure?
): void
Parameters​
Name | Type | Default value |
---|---|---|
ctx | RenderingContext2D | undefined |
fromMeasure | boolean | false |
Returns​
void
Inherited from​
Defined in​
src/Document/RenderedElement.ts:31
clearContext​
â–¸ clearContext(ctx
): void
Parameters​
Name | Type |
---|---|
ctx | RenderingContext2D |
Returns​
void