The goog.graphics Namespace

The goog.graphics.AbstractGraphics Class

Base class for the different graphics. You should never construct objects of this class. Instead us goog.graphics.createGraphics … more

The goog.graphics.AffineTransform Class

Creates a 2D affine transform. An affine transform performs a linear mapping from 2D coordinates to other 2D coordinates that preserves the "straightness" and "parallelness" of lines. Such a coordinate transformation can be represented by a 3 row by 3 column matrix with an implied last row of [ 0 0 1 ]. This matrix transforms source coordinates (x,y) into destination coordinates (x',y') by considering them to be a column vector and multiplying the coordinate vector by the matrix according to the following process:

      [ x']   [  m00  m01  m02  ] [ x ]   [ m00x + m01y + m02 ]
      [ y'] = [  m10  m11  m12  ] [ y ] = [ m10x + m11y + m12 ]
      [ 1 ]   [   0    0    1   ] [ 1 ]   [         1         ]
 
This class is optimized for speed and minimizes calculations based on its knowledge of the underlying matrix (as opposed to say simply performing matrix multiplication). … more

The goog.graphics.CanvasEllipseElement Class

Thin wrapper for canvas ellipse elements. This is an implementation of the goog.graphics.EllipseElement interface. You should not construct objects from this constructor. The graphics will return the object for you. … more

The goog.graphics.CanvasGraphics Class

A Graphics implementation for drawing using canvas. … more

The goog.graphics.CanvasGroupElement Class

Object representing a group of objects in a canvas. This is an implementation of the goog.graphics.GroupElement interface. You should not construct objects from this constructor. The graphics will return the object for you. … more

The goog.graphics.CanvasImageElement Class

Thin wrapper for canvas image elements. This is an implementation of the goog.graphics.ImageElement interface. You should not construct objects from this constructor. The graphics will return the object for you. … more

The goog.graphics.CanvasPathElement Class

Thin wrapper for canvas path elements. This is an implementation of the goog.graphics.PathElement interface. You should not construct objects from this constructor. The graphics will return the object for you. … more

The goog.graphics.CanvasRectElement Class

Thin wrapper for canvas rectangle elements. This is an implementation of the goog.graphics.RectElement interface. You should not construct objects from this constructor. The graphics will return the object for you. … more

The goog.graphics.CanvasTextElement Class

Thin wrapper for canvas text elements. This is an implementation of the goog.graphics.TextElement interface. You should not construct objects from this constructor. The graphics will return the object for you. … more

The goog.graphics.Element Class

Base class for a thin wrapper around the DOM element returned from the different draw methods of the graphics. You should not construct objects from this constructor. The graphics will return the object for you. … more

The goog.graphics.EllipseElement Class

Interface for a graphics ellipse element. You should not construct objects from this constructor. The graphics will return an implementation of this interface for you. … more

The goog.graphics.Fill Class

Creates a fill object … more

The goog.graphics.Font Class

This class represents a font to be used with a renderer. … more

The goog.graphics.GroupElement Class

Interface for a graphics group element. You should not construct objects from this constructor. The graphics will return the object for you. … more

The goog.graphics.ImageElement Class

Interface for a graphics image element. You should not construct objects from this constructor. Instead, you should use {@code goog.graphics.Graphics.drawImage} and it will return an implementation of this interface for you. … more

The goog.graphics.LinearGradient Class

Creates an immutable linear gradient fill object. … more

The goog.graphics.Path Class

Creates a path object. A path is a sequence of segments and may be open or closed. Path uses the EVEN-ODD fill rule for determining the interior of the path. A path must start with a moveTo command. A "simple" path does not contain any arcs and may be transformed using the {@code transform} method. … more

The goog.graphics.PathElement Class

Interface for a graphics path element. You should not construct objects from this constructor. The graphics will return an implementation of this interface for you. … more

The goog.graphics.RectElement Class

Interface for a graphics rectangle element. You should not construct objects from this constructor. The graphics will return an implementation of this interface for you. … more

The goog.graphics.SolidFill Class

Creates an immutable solid color fill object. … more

The goog.graphics.Stroke Class

Creates an immutable stroke object. … more

The goog.graphics.StrokeAndFillElement Class

Interface for a graphics element with a stroke and fill. This is the base interface for ellipse, rectangle and other shape interfaces. You should not construct objects from this constructor. The graphics will return an implementation of this interface for you. … more

The goog.graphics.SvgEllipseElement Class

Thin wrapper for SVG ellipse elements. This is an implementation of the goog.graphics.EllipseElement interface. You should not construct objects from this constructor. The graphics will return the object for you. … more

The goog.graphics.SvgGraphics Class

A Graphics implementation for drawing using SVG. … more

The goog.graphics.SvgGroupElement Class

Thin wrapper for SVG group elements. You should not construct objects from this constructor. The graphics will return the object for you. … more

The goog.graphics.SvgImageElement Class

Thin wrapper for SVG image elements. This is an implementation of the goog.graphics.ImageElement interface. You should not construct objects from this constructor. The graphics will return the object for you. … more

The goog.graphics.SvgPathElement Class

Thin wrapper for SVG path elements. This is an implementation of the goog.graphics.PathElement interface. You should not construct objects from this constructor. The graphics will return the object for you. … more

The goog.graphics.SvgRectElement Class

Thin wrapper for SVG rectangle elements. This is an implementation of the goog.graphics.RectElement interface. You should not construct objects from this constructor. The graphics will return the object for you. … more

The goog.graphics.SvgTextElement Class

Thin wrapper for SVG text elements. This is an implementation of the goog.graphics.TextElement interface. You should not construct objects from this constructor. The graphics will return the object for you. … more

The goog.graphics.TextElement Class

Interface for a graphics text element. You should not construct objects from this constructor. The graphics will return an implementation of this interface for you. … more

The goog.graphics.VmlEllipseElement Class

Thin wrapper for VML ellipse elements. This is an implementation of the goog.graphics.EllipseElement interface. You should not construct objects from this constructor. The graphics will return the object for you. … more

The goog.graphics.VmlGraphics Class

A Graphics implementation for drawing using VML. … more

The goog.graphics.VmlGroupElement Class

Thin wrapper for VML group elements. This is an implementation of the goog.graphics.GroupElement interface. You should not construct objects from this constructor. The graphics will return the object for you. … more

The goog.graphics.VmlImageElement Class

Thin wrapper for VML image elements. This is an implementation of the goog.graphics.ImageElement interface. You should not construct objects from this constructor. The graphics will return the object for you. … more

The goog.graphics.VmlPathElement Class

Thin wrapper for VML path elements. This is an implementation of the goog.graphics.PathElement interface. You should not construct objects from this constructor. The graphics will return the object for you. … more

The goog.graphics.VmlRectElement Class

Thin wrapper for VML rectangle elements. This is an implementation of the goog.graphics.RectElement interface. You should not construct objects from this constructor. The graphics will return the object for you. … more

The goog.graphics.VmlTextElement Class

Thin wrapper for VML text elements. This is an implementation of the goog.graphics.TextElement interface. You should not construct objects from this constructor. The graphics will return the object for you. … more

.createGraphics(width, height, opt_coordWidth, opt_coordHeight, opt_domHelper)

Returns an instance of goog.graphics.AbstractGraphics that knows how to draw for the current platform (A factory for the proper Graphics implementation)

width {string|number}
The width in pixels. Strings expressing percentages of parent with (e.g. '80%') are also accepted.
height {string|number}
The height in pixels. Strings expressing percentages of parent with (e.g. '80%') are also accepted.
opt_coordWidth {?number=}
The optional coordinate width - if omitted or null, defaults to same as width.
opt_coordHeight {?number=}
The optional coordinate height - if omitted or null, defaults to same as height.
opt_domHelper {goog.dom.DomHelper=}
The DOM helper object for the document we want to render in.
returns {goog.graphics.AbstractGraphics}
The created instance.

.createSimpleGraphics(width, height, opt_coordWidth, opt_coordHeight, opt_domHelper)

Returns an instance of goog.graphics.AbstractGraphics that knows how to draw for the current platform (A factory for the proper Graphics implementation)

width {string|number}
The width in pixels. Strings expressing percentages of parent with (e.g. '80%') are also accepted.
height {string|number}
The height in pixels. Strings expressing percentages of parent with (e.g. '80%') are also accepted.
opt_coordWidth {?number=}
The optional coordinate width, defaults to same as width.
opt_coordHeight {?number=}
The optional coordinate height, defaults to same as height.
opt_domHelper {goog.dom.DomHelper=}
The DOM helper object for the document we want to render in.
returns {goog.graphics.AbstractGraphics}
The created instance.

The goog.graphics.ext Namespace

… more

.isBrowserSupported()

Static function to check if the current browser has Graphics support.

returns {boolean}
True if the current browser has Graphics support.

The goog.graphics.paths Namespace

… more