API Overview API Index Package Overview Direct link to this page
JDK 1.6
  java.awt.geom. Line2D.Double View Source
Author(s)
Since
1.2
Version
Serial
Hierarchy
 Object
      Line2D
          Line2D.Double
Implements
 Serializable
Subclasses
Description
publicstatic class Line2D.Double
  A line segment specified with double coordinates.
See also:   
Constructors
public Line2D.Double ()
  Constructs and initializes a Line with coordinates (0, 0) -> (0, 0).
public Line2D.Double (double x1, double y1, double x2, double y2)
  Constructs and initializes a Line2D from the specified coordinates.
public Line2D.Double (Point2D p1, Point2D p2)
  Constructs and initializes a Line2D from the specified Point2D objects.
Methods
Hide/Show inherited methods
public Object clone () [Inherited From Line2D]
  Creates a new object of the same class as this object.
public boolean contains (double x, double y) [Inherited From Line2D]
  Tests if a specified coordinate is inside the boundary of this Line2D.
public boolean contains (double x, double y, double w, double h) [Inherited From Line2D]
  Tests if the interior of this Line2D entirely contains the specified set of rectangular coordinates.
public boolean contains (Point2D p) [Inherited From Line2D]
  Tests if a given Point2D is inside the boundary of this Line2D.
public boolean contains (Rectangle2D r) [Inherited From Line2D]
  Tests if the interior of this Line2D entirely contains the specified Rectangle2D.
public Rectangle getBounds () [Inherited From Line2D]
  Returns an integer Rectangle that completely encloses the Shape.
public Rectangle2D getBounds2D ()
  Returns a high precision and more accurate bounding box of the Shape than the getBounds method.
public Point2D getP1 () [Specified in Line2D]
  Returns the start Point2D of this Line2D.
public Point2D getP2 () [Specified in Line2D]
  Returns the end Point2D of this Line2D.
public PathIterator getPathIterator (AffineTransform at) [Inherited From Line2D]
  Returns an iteration object that defines the boundary of this Line2D.
public PathIterator getPathIterator (AffineTransform at, double flatness) [Inherited From Line2D]
  Returns an iteration object that defines the boundary of this flattened Line2D.
public double getX1 () [Specified in Line2D]
  Returns the X coordinate of the start point in double precision.
public double getX2 () [Specified in Line2D]
  Returns the X coordinate of the end point in double precision.
public double getY1 () [Specified in Line2D]
  Returns the Y coordinate of the start point in double precision.
public double getY2 () [Specified in Line2D]
  Returns the Y coordinate of the end point in double precision.
public boolean intersects (double x, double y, double w, double h) [Inherited From Line2D]
  Tests if the interior of the Shape intersects the interior of a specified rectangular area.
public boolean intersects (Rectangle2D r) [Inherited From Line2D]
  Tests if the interior of the Shape intersects the interior of a specified Rectangle2D.
public boolean intersectsLine (double x1, double y1, double x2, double y2) [Inherited From Line2D]
  Tests if the line segment from (x1,y1) to (x2,y2) intersects this line segment.
public boolean intersectsLine (Line2D l) [Inherited From Line2D]
  Tests if the specified line segment intersects this line segment.
publicstatic boolean linesIntersect (double x1, double y1, double x2, double y2, double x3, double y3, double x4, double y4) [Inherited From Line2D]
  Tests if the line segment from (x1,y1) to (x2,y2) intersects the line segment from (x3,y3) to (x4,y4).
public double ptLineDist (double px, double py) [Inherited From Line2D]
  Returns the distance from a point to this line.
publicstatic double ptLineDist (double x1, double y1, double x2, double y2, double px, double py) [Inherited From Line2D]
  Returns the distance from a point to a line.
public double ptLineDist (Point2D pt) [Inherited From Line2D]
  Returns the distance from a Point2D to this line.
public double ptLineDistSq (double px, double py) [Inherited From Line2D]
  Returns the square of the distance from a point to this line.
publicstatic double ptLineDistSq (double x1, double y1, double x2, double y2, double px, double py) [Inherited From Line2D]
  Returns the square of the distance from a point to a line.
public double ptLineDistSq (Point2D pt) [Inherited From Line2D]
  Returns the square of the distance from a specified Point2D to this line.
public double ptSegDist (double px, double py) [Inherited From Line2D]
  Returns the distance from a point to this line segment.
publicstatic double ptSegDist (double x1, double y1, double x2, double y2, double px, double py) [Inherited From Line2D]
  Returns the distance from a point to a line segment.
public double ptSegDist (Point2D pt) [Inherited From Line2D]
  Returns the distance from a Point2D to this line segment.
public double ptSegDistSq (double px, double py) [Inherited From Line2D]
  Returns the square of the distance from a point to this line segment.
publicstatic double ptSegDistSq (double x1, double y1, double x2, double y2, double px, double py) [Inherited From Line2D]
  Returns the square of the distance from a point to a line segment.
public double ptSegDistSq (Point2D pt) [Inherited From Line2D]
  Returns the square of the distance from a Point2D to this line segment.
public int relativeCCW (double px, double py) [Inherited From Line2D]
  Returns an indicator of where the specified point (px,py) lies with respect to this line segment.
publicstatic int relativeCCW (double x1, double y1, double x2, double y2, double px, double py) [Inherited From Line2D]
  Returns an indicator of where the specified point (px,py) lies with respect to the line segment from (x1,y1) to (x2,y2).
public int relativeCCW (Point2D p) [Inherited From Line2D]
  Returns an indicator of where the specified Point2D lies with respect to this line segment.
public void setLine (double x1, double y1, double x2, double y2) [Specified in Line2D]
  Sets the location of the end points of this Line2D to the specified double coordinates.
public void setLine (Line2D l) [Inherited From Line2D]
  Sets the location of the end points of this Line2D to the same as those end points of the specified Line2D.
public void setLine (Point2D p1, Point2D p2) [Inherited From Line2D]
  Sets the location of the end points of this Line2D to the specified Point2D coordinates.
Fields
Hide/Show inherited fields
public double x1
  The X coordinate of the start point of the line segment.
public double x2
  The X coordinate of the end point of the line segment.
public double y1
  The Y coordinate of the start point of the line segment.
public double y2
  The Y coordinate of the end point of the line segment.
Nested Classes
  Line2D.Float
A line segment specified with float coordinates.
  Line2D.Double
A line segment specified with double coordinates.
Generated By: JavaOnTracks Doclet 0.1.4     ©Thibaut Colar