Create a new linear gradient Pattern along the line defined by p1 and p2. Before using the gradient pattern, a number of color stops should be defined using Gradient.addColorStopRGB() or Gradient.addColorStopRGBA().
the start point
the end point
Note: The coordinates here are in pattern space. For a new pattern, pattern space is identical to user space, but the relationship between the spaces can be changed with Pattern.setMatrix().
See Implementation
Create a new linear gradient Pattern along the line defined by p1 and p2. Before using the gradient pattern, a number of color stops should be defined using Gradient.addColorStopRGB() or Gradient.addColorStopRGBA().