PaintProvider
class PaintProvider implements Paint
Provides the Paint for an SVGElement. It will also respond to changes in the attributes of the element
(not implemented).
Constructor
new PaintProvider(element: SVGElement) → {}
| Name | Type | Description |
|---|---|---|
| element | SVGElement |
The element whose paint is to be provided. |
Public Methods
static parseColor(colorString: string) → {number | string}
Parses the color attribute into an RGBA hexadecimal equivalent, if encoded. If the colorString is none or
is a url(#id) reference, it is returned as is.
| Name | Type | Description |
|---|---|---|
| colorString | string |
| Type | Description |
|---|---|
| number | string |