Module omix.api
Package omix.lang

Class LinearGradient

java.lang.Object
omix.lang.Gradient
omix.lang.LinearGradient
All Implemented Interfaces:
Serializable, Brush, Paint

public final class LinearGradient
extends Gradient
This class represents linear gradients. Linear gradients interpolate colors between start and end points which are given in X and Y. Outside these points the gradient is either padded, reflected or repeated depending on the currently set spread method.

Gradient

Author:
Dr. Peter Droste, Omix Visualization
See Also:
Serialized Form
  • Constructor Details

  • Method Details

    • getStartX

      public double getStartX()
      Returns:
      the x coordinate of the start point
    • setStartX

      public void setStartX​(double startX)
      changes the x coordinate of the start point
      Parameters:
      startX -
    • getStartY

      public double getStartY()
      Returns:
      the y coordinate of the start point
    • setStartY

      public void setStartY​(double startY)
      changes the y coordinate of the start point
      Parameters:
      startY -
    • setStart

      public void setStart​(double startX, double startY)
      changes the coordinates of the start point
      Parameters:
      startX -
      startY -
    • getEndX

      public double getEndX()
      Returns:
      the x coordinate of the end point
    • setEndX

      public void setEndX​(double endX)
      changes the x coordinate of the end point
      Parameters:
      endX -
    • getEndY

      public double getEndY()
      Returns:
      the y coordinate of the end point
    • setEndY

      public void setEndY​(double endY)
      changes the y coordinate of the end point
      Parameters:
      endY -
    • setEnd

      public void setEnd​(double endX, double endY)
      changes the coordinates of the end point
      Parameters:
      endX -
      endY -
    • clone

      public LinearGradient clone()
      Specified by:
      clone in interface Brush
      Specified by:
      clone in interface Paint
      Specified by:
      clone in class Gradient
      Returns:
      A clone of the brush object.
      See Also:
      Gradient.clone()
    • hashCode

      public int hashCode()
      Specified by:
      hashCode in interface Brush
      Specified by:
      hashCode in interface Paint
      Overrides:
      hashCode in class Gradient
    • equals

      public boolean equals​(Object obj)
      Specified by:
      equals in interface Brush
      Specified by:
      equals in interface Paint
      Overrides:
      equals in class Gradient