Class 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:
  • Constructor Details

    • CanvasGradient

      protected CanvasGradient()
  • Method Details

    • addColorStop

      public final void addColorStop(double offset, 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.