Class RadialGradientPoint

java.lang.Object
com.itextpdf.kernel.colors.gradients.RadialGradientPoint

public class RadialGradientPoint extends Object
Radial gradient vector point represented as circle with center and radius.
  • Constructor Details

    • RadialGradientPoint

      public RadialGradientPoint()
      Creates an instance with (0,0) center and 0 radius.
    • RadialGradientPoint

      public RadialGradientPoint (Point center, double radius)
      Creates an instance with specified center and radius.
      Parameters:
      center - the center of the circle
      radius - the radius of the circle
    • RadialGradientPoint

      public RadialGradientPoint (RadialGradientPoint point)
      Copy constructor.
      Parameters:
      point - the point to copy
  • Method Details

    • getCenter

      public Point getCenter()
      Get the center as a Point instance
      Returns:
      the Point object representing the circle center
    • getRadius

      public double getRadius()
      Get the radius.
      Returns:
      the radius
    • setRadius

      public void setRadius (double radius)
      Set the radius.
      Parameters:
      radius - the radius value
    • getX

      public double getX()
      Get the X coordinate of the center.
      Returns:
      the X coordinate
    • getY

      public double getY()
      Get the Y coordinate of the center.
      Returns:
      the Y coordinate
    • distance

      public double distance (RadialGradientPoint c)
      Get the distance between this and other point centers.
      Parameters:
      c - the point to which center the distance is needed
      Returns:
      the distance value