Class RadialGradientPoint
java.lang.Object
com.itextpdf.kernel.colors.gradients.RadialGradientPoint
Radial gradient vector point represented as circle with center and radius.
-
Constructor Summary
ConstructorsConstructorDescriptionCreates an instance with (0,0) center and 0 radius.Copy constructor.RadialGradientPoint(Point center, double radius) Creates an instance with specified center and radius. -
Method Summary
Modifier and TypeMethodDescriptiondoubleGet the distance between this and other point centers.Get the center as aPointinstancedoubleGet the radius.doublegetX()Get the X coordinate of the center.doublegetY()Get the Y coordinate of the center.voidsetRadius(double radius) Set the radius.
-
Constructor Details
-
RadialGradientPoint
public RadialGradientPoint()Creates an instance with (0,0) center and 0 radius. -
RadialGradientPoint
Creates an instance with specified center and radius.- Parameters:
-
center- the center of the circle -
radius- the radius of the circle
-
RadialGradientPoint
Copy constructor.- Parameters:
-
point- the point to copy
-
-
Method Details
-
getCenter
Get the center as aPointinstance- Returns:
-
the
Pointobject 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
Get the distance between this and other point centers.- Parameters:
-
c- the point to which center the distance is needed - Returns:
- the distance value
-