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) → {}
Parameters:
Name Type Description
element SVGElement

The element whose paint is to be provided.

Summary


Methods from PaintProvider

Public Methods


parseColor PaintProvider.ts:60
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.

Parameters:
Name Type Description
colorString string
Returns:
Type Description
number | string
See: https://github.com/bigtimebuddy/pixi-svg/blob/89e4ab834fa4ef05b64741596516c732eae34daa/src/SVG.js#L106

Powered by webdoc!