Methods
Static createCircle
- createCircle(radius: number, attributes?: Array<[]>): SVGCircleElement
-
Parameters
-
radius: number
-
Optional attributes: Array<[]>
Returns SVGCircleElement
Static createDefs
- createDefs(): SVGDefsElement
Static createEllipse
- createEllipse(rx: number, ry: number, attributes?: Array<[]>): SVGEllipseElement
-
Parameters
-
rx: number
-
ry: number
-
Optional attributes: Array<[]>
Returns SVGEllipseElement
Static createGroup
- createGroup(attributes?: Array<[]>): SVGGElement
-
Parameters
-
Optional attributes: Array<[]>
Returns SVGGElement
Static createImage
- createImage(attributes?: Array<[]>): SVGImageElement
-
Parameters
-
Optional attributes: Array<[]>
Returns SVGImageElement
Static createLine
- createLine(x1: number | string, y1: number | string, x2: number | string, y2: number | string, attributes?: Array<[]>): SVGLineElement
-
Parameters
-
x1: number | string
-
y1: number | string
-
x2: number | string
-
y2: number | string
-
Optional attributes: Array<[]>
Returns SVGLineElement
Static createMarker
- createMarker(id: string, orient: string, markerWidth: number | string, markerHeight: number | string, refX: number | string, refY: number | string, markerElement: SVGGraphicsElement): SVGMarkerElement
-
Parameters
-
id: string
-
orient: string
-
markerWidth: number | string
-
markerHeight: number | string
-
refX: number | string
-
refY: number | string
-
markerElement: SVGGraphicsElement
Returns SVGMarkerElement
Static createPath
- createPath(d: string, attributes?: Array<[]>): SVGPathElement
-
Parameters
-
d: string
-
Optional attributes: Array<[]>
Returns SVGPathElement
Static createPoint
- createPoint(x: number, y: number): SVGPoint
-
Parameters
Returns SVGPoint
Static createPolygon
- createPolygon(points: string, attributes?: Array<[]>): SVGPolygonElement
-
Parameters
-
points: string
-
Optional attributes: Array<[]>
Returns SVGPolygonElement
Static createRect
- createRect(width: number | string, height: number | string, attributes?: Array<[]>): SVGRectElement
-
Parameters
-
width: number | string
-
height: number | string
-
Optional attributes: Array<[]>
Returns SVGRectElement
Static createTSpan
- createTSpan(text: string, attributes?: Array<[]>): SVGTSpanElement
-
Parameters
-
text: string
-
Optional attributes: Array<[]>
Returns SVGTSpanElement
Static createText
- createText(attributes?: Array<[]>): SVGTextElement
-
Parameters
-
Optional attributes: Array<[]>
Returns SVGTextElement
Static createTransform
- createTransform(): SVGTransform
Static setAttributes
- setAttributes(el: SVGElement, attributes: Array<[]>): void
-
Parameters
-
el: SVGElement
-
attributes: Array<[]>
Returns void
Utility class to simplify SVG operations.