Package com.pdfjet
Class Point
java.lang.Object
com.pdfjet.Point
- All Implemented Interfaces:
Drawable
A point with a marker: a shape drawn around its (x, y) coordinates, which
are the center of the marker. A point is drawn on a page on its own, as the
marker of a table cell, or in a chart Series, and a list of points is a
path for Page.drawPath.
Please see Example_05.
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final charA control point of a curve drawn with the c operator, which uses both control points.static final charA control point of a curve drawn with the v operator, where the first control point is the start point.static final charA control point of a curve drawn with the y operator, where the second control point is the end point. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionfloat[]Draws this point on the specified page.Returns what the point stands for.float[]Returns the fill color of this point.floatReturns the radius of this point.getShape()Returns the shape of the marker drawn at this point.float[]Returns the stroke color of this point.floatReturns the width of the lines used to draw this point.Returns the URI of the link opened by a click on this point.floatgetX()Returns the x coordinate of this point.floatgetY()Returns the y coordinate of this point.setAltDescription(String altDescription) Sets what a point that is a link stands for, like the country a point of a chart is, for a screen reader: in a tagged document, PDF/UA or a PDF/A of level A, a point of a chart that is a link is a figure of its own in the Link, described by it.setFillColor(float[] rgbColor) Sets the fill color of this point.setFillColor(int color) Sets the fill color of this point.setLocation(float x, float y) Sets the location (x, y) of this point.setRadius(float r) Sets the radius of this point.Sets the shape of the marker drawn at this point.setStrokeColor(float[] rgbColor) Sets the stroke color of this point.setStrokeColor(int color) Sets the stroke color of this point.setStrokeWidth(float strokeWidth) Sets the width of the lines of this point.setURIAction(String uri) Sets the URI of the link opened by a click on this point.setX(float x) Sets the x coordinate of this point.setY(float y) Sets the y coordinate of this point.
-
Field Details
-
CONTROL_POINT_C
public static final char CONTROL_POINT_CA control point of a curve drawn with the c operator, which uses both control points.- See Also:
-
CONTROL_POINT_V
public static final char CONTROL_POINT_VA control point of a curve drawn with the v operator, where the first control point is the start point.- See Also:
-
CONTROL_POINT_Y
public static final char CONTROL_POINT_YA control point of a curve drawn with the y operator, where the second control point is the end point.- See Also:
-
-
Constructor Details
-
Point
public Point()The default constructor. -
Point
Copy constructor. Creates a copy of the specified point, including its marker and its URI action.- Parameters:
point- the point to copy.
-
Point
public Point(float x, float y) Constructor for creating point objects.- Parameters:
x- the x coordinate of this point when drawn on the page.y- the y coordinate of this point when drawn on the page.
-
Point
public Point(float x, float y, char controlPoint) Constructor for creating point objects.- Parameters:
x- the x coordinate of this point when drawn on the page.y- the y coordinate of this point when drawn on the page.controlPoint- the type of control point specifying.
-
-
Method Details
-
setLocation
Sets the location (x, y) of this point.- Specified by:
setLocationin interfaceDrawable- Parameters:
x- the x coordinate of this point when drawn on the page.y- the y coordinate of this point when drawn on the page.- Returns:
- the location of the point.
-
setX
Sets the x coordinate of this point.- Parameters:
x- the x coordinate of this point when drawn on the page.- Returns:
- this Point object.
-
getX
public float getX()Returns the x coordinate of this point.- Returns:
- the x coordinate of this point.
-
setY
Sets the y coordinate of this point.- Parameters:
y- the y coordinate of this point when drawn on the page.- Returns:
- this Point object.
-
getY
public float getY()Returns the y coordinate of this point.- Returns:
- the y coordinate of this point.
-
setRadius
Sets the radius of this point.- Parameters:
r- the radius.- Returns:
- this Point object.
-
getRadius
public float getRadius()Returns the radius of this point.- Returns:
- the radius of this point.
-
setFillColor
Sets the fill color of this point. Color.transparent leaves it unchanged.- Parameters:
color- the color as a 0xRRGGBB value, for example Color.blue.- Returns:
- this Point object.
-
setFillColor
Sets the fill color of this point.- Parameters:
rgbColor- the red, green and blue components, from 0.0 to 1.0.- Returns:
- this Point object.
-
getFillColor
public float[] getFillColor()Returns the fill color of this point.- Returns:
- the red, green and blue components, from 0.0 to 1.0.
-
setStrokeColor
Sets the stroke color of this point. Color.transparent leaves it unchanged.- Parameters:
color- the color as a 0xRRGGBB value, for example Color.blue.- Returns:
- this Point object.
-
setStrokeColor
Sets the stroke color of this point.- Parameters:
rgbColor- the red, green and blue components, from 0.0 to 1.0.- Returns:
- this Point object.
-
getStrokeColor
public float[] getStrokeColor()Returns the stroke color of this point.- Returns:
- the red, green and blue components, from 0.0 to 1.0.
-
setShape
Sets the shape of the marker drawn at this point.- Parameters:
shape- the shape, for example Shape.CIRCLE; Shape.INVISIBLE draws no marker.- Returns:
- this Point object.
-
getShape
Returns the shape of the marker drawn at this point.- Returns:
- the shape.
-
setStrokeWidth
Sets the width of the lines of this point.- Parameters:
strokeWidth- the line width.- Returns:
- this Point object.
-
getStrokeWidth
public float getStrokeWidth()Returns the width of the lines used to draw this point.- Returns:
- the width of the lines used to draw this point.
-
setURIAction
Sets the URI of the link opened by a click on this point.- Parameters:
uri- the URI.- Returns:
- this Point object.
-
setAltDescription
Sets what a point that is a link stands for, like the country a point of a chart is, for a screen reader: in a tagged document, PDF/UA or a PDF/A of level A, a point of a chart that is a link is a figure of its own in the Link, described by it. Without one it is described by its URI.- Parameters:
altDescription- what the point stands for.- Returns:
- this Point object.
-
getAltDescription
Returns what the point stands for.- Returns:
- the description, or null.
-
getURIAction
Returns the URI of the link opened by a click on this point.- Returns:
- the URI, or null.
-
drawOn
Draws this point on the specified page.
-