API Reference
Still have questions?
Contact support
You are looking at an outdated 7.14.3 version of this document. Switch to the 8.1.0 version to see the up to date information.

namespace Improve this Doc

A namespace for working with vector graphics.

Functions Overview

normalizeFill()Normalizes stroke params. Look at params for details.
normalizeHatchFill()Normalize hatch fill.
normalizeStroke()Normalizes stroke params. Look at params for details.

Classes Overview Class. Inherited from Ellipse. representing independent clip, that can be applied to any element. class for all vector elements, such as groups and primitives. Class. is a special pattern fill with predefined set of a primitives. Sets of a primitives does numbered and primitive. class. Used to group elements. gradient. class. fill class. gradient. class class for all vector elements. class provide tools for cross-browser display with the single interface for both (SVG and VML). class.

Functions Description


Normalizes stroke params. Look at params for details.


Name Type Description
fillOrColorOrKeys | !Array.<(|string)> | null Fill settings or Color or Gradient keys.
opacityOrAngleOrCx number Opacity or Angle or x-coord of center.
modeOrCy number | boolean | | Object Mode settings or y-coord of center.
opacityOrMode number | | Object | null Opacity settings or Mode settings.
opacity number Opacity settings.
fx number Focal x-coord settings.
fy number Focal y-coord settings.


Normalize hatch fill.


Name Type Description
patternFillOrType | | | string | Object | null Pattern fill or type of the hatch fill.
color string Color.
thickness string | number Line thickness. Defaults to 1.
size string | number Size.


Normalizes stroke params. Look at params for details.


Name Type Description
strokeOrFill | | string | null Stroke fill, if used as setter.
thickness number Line thickness. Defaults to 1.
dashpattern string Controls the pattern of dashes and gaps used to stroke paths. Dash array contains a list of comma and/or white space separated lengths and percentages that specify the lengths of alternating dashes and gaps. If an odd number of values is provided, then the list of values is repeated to yield an even number of values. Thus, stroke dashpattern: 5,3,2 is equivalent to dashpattern: 5,3,2,5,3,2.
lineJoin Line join style.
lineCap Line cap style.

Returns: - Stroke.