Class AxialShadingPattern


public class AxialShadingPattern extends ShadingPattern
A color blend that varies along an axis. An axial shading specifies a color blend that varies along a linear axis between two endpoints, and indefinitely perpendicular to that axis.
  • Constructor Details

    • AxialShadingPattern

      public AxialShadingPattern(ColorSpace colorSpace, List<Point> coords, List<Function> function)
      Create an AxialShadingPattern.

      Parameters:
      colorSpace - The color space for the pattern.
      coords - The coordinates of the two endpoints of the axial shading.
      function - One 1-in n-out function, or an array of n 1-in 1-out functions that determine the values of the color channels.
  • Method Details

    • delete

      public void delete()
      Overrides:
      delete in class ShadingPattern
    • toString

      public String toString()
      Return a string representation of the AxialShadingPattern.
      Overrides:
      toString in class ShadingPattern
    • getCoords

      public List<Point> getCoords()
      The coordinates of the two endpoints of the axial shading.
    • setCoords

      public void setCoords(List<Point> coords)
      The coordinates of the two endpoints of the axial shading.
    • getFunction

      public List<Function> getFunction()
      One 1-in n-out function, or an array of n 1-in 1-out functions that determine the values of the color channels, where n is the number of color components in the shading's color space. The functions are called with a parametric variable t which varies across the Domain.
    • setFunction

      public void setFunction(List<Function> function)
      One 1-in n-out function, or an array of n 1-in 1-out functions that determine the values of the color channels, where n is the number of color components in the shading's color space. The functions are called with a parametric variable t which varies across the Domain.
    • getDomain

      public List<Double> getDomain()
      A array of two numbers that specify the limiting values of the parametric variable t. This variable t varies linearly between these two values as a the gradient varies between the starting and ending points of the axis.

      Defaults to [0, 1]. May be NULL.

    • setDomain

      public void setDomain(List<Double> domain)
      A array of two numbers that specify the limiting values of the parametric variable t. This variable t varies linearly between these two values as a the gradient varies between the starting and ending points of the axis.

      Defaults value: [0, 1]. May be NULL.

    • getExtend

      public List<Boolean> getExtend()
      An array of two boolean values indicating whether to extend the shading beyond the starting and ending points of the axis, respectively.

      Default value: [false, false]. May be NULL.

    • setExtend

      public void setExtend(List<Boolean> extend)
      An array of two boolean values indicating whether to extend the shading beyond the starting and ending points of the axis, respectively.

      Default value: [false, false]. May be NULL.