Uses of Class
java.awt.geom.Point2D
Package
Description
Contains all of the classes for creating user interfaces and for painting
graphics and images.
Provides classes and interface relating to fonts.
Provides the Java 2D classes for defining and performing operations on
objects related to two-dimensional geometry.
Provides classes for creating and modifying images.
Provides one interface and many abstract classes that Swing uses to provide
its pluggable look-and-feel capabilities.
Provides classes and interfaces that deal with editable and noneditable text
components.
-
Uses of Point2D in java.awt
Modifier and TypeClassDescriptionclass
A point representing a location in(x,y)
coordinate space, specified in integer precision.Modifier and TypeMethodDescriptionRadialGradientPaint.getCenterPoint()
Returns a copy of the center point of the radial gradient.LinearGradientPaint.getEndPoint()
Returns a copy of the end point of the gradient axis.RadialGradientPaint.getFocusPoint()
Returns a copy of the focus point of the radial gradient.GradientPaint.getPoint1()
Returns a copy of the point P1 that anchors the first color.GradientPaint.getPoint2()
Returns a copy of the point P2 which anchors the second color.LinearGradientPaint.getStartPoint()
Returns a copy of the start point of the gradient axis.Modifier and TypeMethodDescriptionboolean
Tests if a specifiedPoint2D
is inside the boundary of theShape
, as described by the definition of insideness.boolean
Tests if a specifiedPoint2D
is inside the boundary of theShape
, as described by the definition of insideness.ModifierConstructorDescriptionGradientPaint
(Point2D pt1, Color color1, Point2D pt2, Color color2) Constructs a simple acyclicGradientPaint
object.GradientPaint
(Point2D pt1, Color color1, Point2D pt2, Color color2, boolean cyclic) Constructs either a cyclic or acyclicGradientPaint
object depending on theboolean
parameter.LinearGradientPaint
(Point2D start, Point2D end, float[] fractions, Color[] colors) Constructs aLinearGradientPaint
with a defaultNO_CYCLE
repeating method andSRGB
color space.LinearGradientPaint
(Point2D start, Point2D end, float[] fractions, Color[] colors, MultipleGradientPaint.CycleMethod cycleMethod) Constructs aLinearGradientPaint
with a defaultSRGB
color space.LinearGradientPaint
(Point2D start, Point2D end, float[] fractions, Color[] colors, MultipleGradientPaint.CycleMethod cycleMethod, MultipleGradientPaint.ColorSpaceType colorSpace, AffineTransform gradientTransform) Constructs aLinearGradientPaint
.RadialGradientPaint
(Point2D center, float radius, float[] fractions, Color[] colors) Constructs aRadialGradientPaint
with a defaultNO_CYCLE
repeating method andSRGB
color space, using the center as the focus point.RadialGradientPaint
(Point2D center, float radius, float[] fractions, Color[] colors, MultipleGradientPaint.CycleMethod cycleMethod) Constructs aRadialGradientPaint
with a defaultSRGB
color space, using the center as the focus point.RadialGradientPaint
(Point2D center, float radius, Point2D focus, float[] fractions, Color[] colors, MultipleGradientPaint.CycleMethod cycleMethod) Constructs aRadialGradientPaint
with a defaultSRGB
color space.RadialGradientPaint
(Point2D center, float radius, Point2D focus, float[] fractions, Color[] colors, MultipleGradientPaint.CycleMethod cycleMethod, MultipleGradientPaint.ColorSpaceType colorSpace, AffineTransform gradientTransform) Constructs aRadialGradientPaint
. -
Uses of Point2D in java.awt.font
Modifier and TypeMethodDescriptionabstract Point2D
GlyphVector.getGlyphPosition
(int glyphIndex) Returns the position of the specified glyph relative to the origin of thisGlyphVector
.Modifier and TypeMethodDescriptionvoid
TextLayout.hitToPoint
(TextHitInfo hit, Point2D point) Convert a hit to a point in standard coordinates.abstract void
LayoutPath.pathToPoint
(Point2D location, boolean preceding, Point2D point) Convert a location relative to the path to a point in user coordinates.abstract boolean
LayoutPath.pointToPath
(Point2D point, Point2D location) Convert a point in user space to a location relative to the path.abstract void
GlyphVector.setGlyphPosition
(int glyphIndex, Point2D newPos) Sets the position of the specified glyph within thisGlyphVector
. -
Uses of Point2D in java.awt.geom
Modifier and TypeClassDescriptionstatic class
TheDouble
class defines a point specified indouble
precision.static class
TheFloat
class defines a point specified in float precision.Modifier and TypeMethodDescriptionAffineTransform.deltaTransform
(Point2D ptSrc, Point2D ptDst) Transforms the relative distance vector specified byptSrc
and stores the result inptDst
.CubicCurve2D.Double.getCtrlP1()
Returns the first control point.CubicCurve2D.Float.getCtrlP1()
Returns the first control point.abstract Point2D
CubicCurve2D.getCtrlP1()
Returns the first control point.CubicCurve2D.Double.getCtrlP2()
Returns the second control point.CubicCurve2D.Float.getCtrlP2()
Returns the second control point.abstract Point2D
CubicCurve2D.getCtrlP2()
Returns the second control point.QuadCurve2D.Double.getCtrlPt()
Returns the control point.QuadCurve2D.Float.getCtrlPt()
Returns the control point.abstract Point2D
QuadCurve2D.getCtrlPt()
Returns the control point.final Point2D
Path2D.getCurrentPoint()
Returns the coordinates most recently added to the end of the path as aPoint2D
object.Arc2D.getEndPoint()
Returns the ending point of the arc.CubicCurve2D.Double.getP1()
Returns the start point.CubicCurve2D.Float.getP1()
Returns the start point.abstract Point2D
CubicCurve2D.getP1()
Returns the start point.Line2D.Double.getP1()
Returns the startPoint2D
of thisLine2D
.Line2D.Float.getP1()
Returns the startPoint2D
of thisLine2D
.abstract Point2D
Line2D.getP1()
Returns the startPoint2D
of thisLine2D
.QuadCurve2D.Double.getP1()
Returns the start point.QuadCurve2D.Float.getP1()
Returns the start point.abstract Point2D
QuadCurve2D.getP1()
Returns the start point.CubicCurve2D.Double.getP2()
Returns the end point.CubicCurve2D.Float.getP2()
Returns the end point.abstract Point2D
CubicCurve2D.getP2()
Returns the end point.Line2D.Double.getP2()
Returns the endPoint2D
of thisLine2D
.Line2D.Float.getP2()
Returns the endPoint2D
of thisLine2D
.abstract Point2D
Line2D.getP2()
Returns the endPoint2D
of thisLine2D
.QuadCurve2D.Double.getP2()
Returns the end point.QuadCurve2D.Float.getP2()
Returns the end point.abstract Point2D
QuadCurve2D.getP2()
Returns the end point.Arc2D.getStartPoint()
Returns the starting point of the arc.AffineTransform.inverseTransform
(Point2D ptSrc, Point2D ptDst) Inverse transforms the specifiedptSrc
and stores the result inptDst
.Transforms the specifiedptSrc
and stores the result inptDst
.Modifier and TypeMethodDescriptionvoid
Adds thePoint2D
objectpt
to thisRectangle2D
.boolean
Tests if a specifiedPoint2D
is inside the boundary of theShape
, as described by the definition of insideness.boolean
Tests if a specifiedPoint2D
is inside the boundary of theShape
, as described by the definition of insideness.boolean
Tests if a givenPoint2D
is inside the boundary of thisLine2D
.static boolean
Path2D.contains
(PathIterator pi, Point2D p) Tests if the specifiedPoint2D
is inside the closed boundary of the specifiedPathIterator
.final boolean
Tests if a specifiedPoint2D
is inside the boundary of theShape
, as described by the definition of insideness.boolean
Tests if a specifiedPoint2D
is inside the boundary of theShape
, as described by the definition of insideness.boolean
Tests if a specifiedPoint2D
is inside the boundary of theShape
, as described by the definition of insideness.AffineTransform.deltaTransform
(Point2D ptSrc, Point2D ptDst) Transforms the relative distance vector specified byptSrc
and stores the result inptDst
.double
Returns the distance from thisPoint2D
to a specifiedPoint2D
.double
Point2D.distanceSq
(Point2D pt) Returns the square of the distance from thisPoint2D
to a specifiedPoint2D
.AffineTransform.inverseTransform
(Point2D ptSrc, Point2D ptDst) Inverse transforms the specifiedptSrc
and stores the result inptDst
.int
Determines where the specifiedPoint2D
lies with respect to thisRectangle2D
.double
Line2D.ptLineDist
(Point2D pt) Returns the distance from aPoint2D
to this line.double
Line2D.ptLineDistSq
(Point2D pt) Returns the square of the distance from a specifiedPoint2D
to this line.double
Returns the distance from aPoint2D
to this line segment.double
Line2D.ptSegDistSq
(Point2D pt) Returns the square of the distance from aPoint2D
to this line segment.int
Line2D.relativeCCW
(Point2D p) Returns an indicator of where the specifiedPoint2D
lies with respect to this line segment.void
Sets the starting angle and angular extent of this arc using two points.void
Arc2D.setAngleStart
(Point2D p) Sets the starting angle of this arc to the angle that the specified point defines relative to the center of this arc.void
Arc2D.setArc
(Point2D loc, Dimension2D size, double angSt, double angExt, int closure) Sets the location, size, angular extents, and closure type of this arc to the specified values.void
Arc2D.setArcByTangent
(Point2D p1, Point2D p2, Point2D p3, double radius) Sets the position, bounds, and angular extents of this arc to the specified value.void
Sets the location of the end points and control points of this curve to the coordinates of thePoint2D
objects at the specified offset in the specified array.void
Sets the location of the end points and control points of this curve to the specifiedPoint2D
coordinates.void
Sets the location of the end points and control points of thisQuadCurve2D
to the coordinates of thePoint2D
objects at the specified offset in the specified array.void
Sets the location of the end points and control point of thisQuadCurve2D
to the specifiedPoint2D
coordinates.void
RectangularShape.setFrame
(Point2D loc, Dimension2D size) Sets the location and size of the framing rectangle of thisShape
to the specifiedPoint2D
andDimension2D
, respectively.void
RectangularShape.setFrameFromCenter
(Point2D center, Point2D corner) Sets the framing rectangle of thisShape
based on a specified centerPoint2D
and cornerPoint2D
.void
RectangularShape.setFrameFromDiagonal
(Point2D p1, Point2D p2) Sets the diagonal of the framing rectangle of thisShape
based on two specifiedPoint2D
objects.void
Sets the location of the end points of thisLine2D
to the specifiedPoint2D
coordinates.void
Point2D.setLocation
(Point2D p) Sets the location of thisPoint2D
to the same coordinates as the specifiedPoint2D
object.void
Transforms an array of point objects by this transform.Transforms the specifiedptSrc
and stores the result inptDst
. -
Uses of Point2D in java.awt.image
Modifier and TypeMethodDescriptionfinal Point2D
AffineTransformOp.getPoint2D
(Point2D srcPt, Point2D dstPt) Returns the location of the corresponding destination point given a point in the source.final Point2D
BandCombineOp.getPoint2D
(Point2D srcPt, Point2D dstPt) Returns the location of the corresponding destination point given a point in the sourceRaster
.BufferedImageOp.getPoint2D
(Point2D srcPt, Point2D dstPt) Returns the location of the corresponding destination point given a point in the source image.final Point2D
ColorConvertOp.getPoint2D
(Point2D srcPt, Point2D dstPt) Returns the location of the destination point given a point in the source.final Point2D
ConvolveOp.getPoint2D
(Point2D srcPt, Point2D dstPt) Returns the location of the destination point given a point in the source.final Point2D
LookupOp.getPoint2D
(Point2D srcPt, Point2D dstPt) Returns the location of the destination point given a point in the source.RasterOp.getPoint2D
(Point2D srcPt, Point2D dstPt) Returns the location of the destination point given a point in the source Raster.final Point2D
RescaleOp.getPoint2D
(Point2D srcPt, Point2D dstPt) Returns the location of the destination point given a point in the source.Modifier and TypeMethodDescriptionfinal Point2D
AffineTransformOp.getPoint2D
(Point2D srcPt, Point2D dstPt) Returns the location of the corresponding destination point given a point in the source.final Point2D
BandCombineOp.getPoint2D
(Point2D srcPt, Point2D dstPt) Returns the location of the corresponding destination point given a point in the sourceRaster
.BufferedImageOp.getPoint2D
(Point2D srcPt, Point2D dstPt) Returns the location of the corresponding destination point given a point in the source image.final Point2D
ColorConvertOp.getPoint2D
(Point2D srcPt, Point2D dstPt) Returns the location of the destination point given a point in the source.final Point2D
ConvolveOp.getPoint2D
(Point2D srcPt, Point2D dstPt) Returns the location of the destination point given a point in the source.final Point2D
LookupOp.getPoint2D
(Point2D srcPt, Point2D dstPt) Returns the location of the destination point given a point in the source.RasterOp.getPoint2D
(Point2D srcPt, Point2D dstPt) Returns the location of the destination point given a point in the source Raster.final Point2D
RescaleOp.getPoint2D
(Point2D srcPt, Point2D dstPt) Returns the location of the destination point given a point in the source. -
Uses of Point2D in javax.swing.plaf
Modifier and TypeMethodDescriptionTextUI.getToolTipText2D
(JTextComponent t, Point2D pt) Returns the string to be used as the tooltip at the passed in location.int
TextUI.viewToModel2D
(JTextComponent t, Point2D pt, Position.Bias[] biasReturn) Provides a mapping from the view coordinate space to the logical coordinate space of the model. -
Uses of Point2D in javax.swing.text
Modifier and TypeMethodDescriptionint
JTextComponent.viewToModel2D
(Point2D pt) Converts the given place in the view coordinate system to the nearest representative location in the model.