Overview | Package | Class | Use | Tree | Deprecated | Index | Help
| GWT 2.4.0
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## com.google.gwt.canvas.dom.client
Class CanvasGradient

    java.lang.Object
      com.google.gwt.core.client.JavaScriptObject
          com.google.gwt.canvas.dom.client.FillStrokeStyle
              com.google.gwt.canvas.dom.client.CanvasGradient

    public class CanvasGradient

extends FillStrokeStyle

Gradient object used with `Context2d`. This class serves as a reference to a gradient created using `Context2d.createPattern(com.google.gwt.dom.client.CanvasElement, com.google.gwt.canvas.dom.client.Context2d.Repetition)`.

See Also:
  HTML Canvas 2D CanvasGradient

Field Summary

Fields inherited from class com.google.gwt.canvas.dom.client.FillStrokeStyle
`TYPE_CSSCOLOR, TYPE_GRADIENT, TYPE_PATTERN`

Constructor Summary
`protected` | `CanvasGradient()`

Method Summary
`void` | `addColorStop(double offset, java.lang.String color)` Adds a new color stop to the gradient.

Methods inherited from class com.google.gwt.canvas.dom.client.FillStrokeStyle
`getType`

Methods inherited from class com.google.gwt.core.client.JavaScriptObject
`cast, createArray, createFunction, createObject, equals, hashCode, toSource, toString`

Methods inherited from class java.lang.Object
`clone, finalize, getClass, notify, notifyAll, wait, wait, wait`

Constructor Detail

### CanvasGradient

    protected CanvasGradient()

Method Detail

### addColorStop

    public final void addColorStop(double offset,
                                   java.lang.String color)

  Adds a new color stop to the gradient.

  Parameters:
    `offset` - value between 0 and 1 for where the color stop is located.
    `color` - color at the stop.

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
| GWT 2.4.0
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD