Version 3.18.1
Show:

graphics Module

The Graphics module provides a JavaScript API for creating shapes in a variety of formats across a browser test baseline. Based on device and browser capabilities, Graphics leverages SVG, Canvas and VML to render its graphical elements.

The Graphics module features a Graphic class that allows you to easily create and manage shapes. Currently, a Graphic instance can be used to create predifined shapes and free-form polygons with fill and stroke properties.

The Graphics module normalizes an API through the use of alias and implementation classes that share interfaces. Each alias class points to an appropriate implementation class dependent on the browser's capabilities. There should rarely, if ever, be a need to interact directly with an implementation class.

Below is a list of available classes.

You can also extend the Shape class to create your own custom shape classes.