public class CanvasGradient extends FillStrokeStyle
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)
.TYPE_CSSCOLOR, TYPE_GRADIENT, TYPE_PATTERN
Modifier | Constructor and Description |
---|---|
protected |
CanvasGradient() |
Modifier and Type | Method and Description |
---|---|
void |
addColorStop(double offset,
String color)
Adds a new color stop to the gradient.
|
getType
cast, createArray, createArray, createFunction, createObject, equals, hashCode, toSource, toString
public final void addColorStop(double offset, String color)
offset
- value between 0 and 1 for where the color stop is located.color
- color at the stop.Copyright © 2016. All rights reserved.