java.awt.geom
Class Line2D.Float
- Line2D
- Cloneable, Shape
This class defines a point in float
precision.
float | x1 - The x coordinate of the first point.
|
float | x2 - The x coordinate of the second point.
|
float | y1 - The y coordinate of the first point.
|
float | y2 - The y coordinate of the second point.
|
Float() - Construct the line segment (0,0)->(0,0).
|
Float(float x1, float y1, float x2, float y2) - Construct the line segment with the specified points.
|
Float(Point2D p1, Point2D p2) - Construct the line segment with the specified points.
|
Rectangle2D | getBounds2D() - Return the exact bounds of this line segment.
|
Point2D | getP1() - Return the first point.
|
Point2D | getP2() - Return the second point.
|
double | getX1() - Return the x coordinate of the first point.
|
double | getX2() - Return the x coordinate of the second point.
|
double | getY1() - Return the y coordinate of the first point.
|
double | getY2() - Return the y coordinate of the second point.
|
void | setLine(double x1, double y1, double x2, double y2) - Set this line to the given points.
|
void | setLine(float x1, float y1, float x2, float y2) - Set this line to the given points.
|
clone , contains , contains , contains , contains , getBounds , getP1 , getP2 , getPathIterator , getPathIterator , getX1 , getX2 , getY1 , getY2 , intersects , intersects , intersectsLine , intersectsLine , linesIntersect , ptLineDist , ptLineDist , ptLineDist , ptLineDistSq , ptLineDistSq , ptLineDistSq , ptSegDist , ptSegDist , ptSegDist , ptSegDistSq , ptSegDistSq , ptSegDistSq , relativeCCW , relativeCCW , relativeCCW , setLine , setLine , setLine |
clone , equals , extends Object> getClass , finalize , hashCode , notify , notifyAll , toString , wait , wait , wait |
x1
public float x1
The x coordinate of the first point.
x2
public float x2
The x coordinate of the second point.
y1
public float y1
The y coordinate of the first point.
y2
public float y2
The y coordinate of the second point.
Float
public Float()
Construct the line segment (0,0)->(0,0).
Float
public Float(float x1,
float y1,
float x2,
float y2)
Construct the line segment with the specified points.
x1
- the x coordinate of the first pointy1
- the y coordinate of the first pointx2
- the x coordinate of the second pointy2
- the y coordinate of the second point
Float
public Float(Point2D p1,
Point2D p2)
Construct the line segment with the specified points.
p1
- the first pointp2
- the second point
getX1
public double getX1()
Return the x coordinate of the first point.
- getX1 in interface Line2D
getX2
public double getX2()
Return the x coordinate of the second point.
- getX2 in interface Line2D
getY1
public double getY1()
Return the y coordinate of the first point.
- getY1 in interface Line2D
getY2
public double getY2()
Return the y coordinate of the second point.
- getY2 in interface Line2D
setLine
public void setLine(double x1,
double y1,
double x2,
double y2)
Set this line to the given points.
- setLine in interface Line2D
x1
- the new x coordinate of the first pointy1
- the new y coordinate of the first pointx2
- the new x coordinate of the second pointy2
- the new y coordinate of the second point
setLine
public void setLine(float x1,
float y1,
float x2,
float y2)
Set this line to the given points.
x1
- the new x coordinate of the first pointy1
- the new y coordinate of the first pointx2
- the new x coordinate of the second pointy2
- the new y coordinate of the second point
Line2D.java -- represents a line in 2-D space, plus operations on a line
Copyright (C) 2000, 2001, 2002 Free Software Foundation
This file is part of GNU Classpath.
GNU Classpath is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2, or (at your option)
any later version.
GNU Classpath is distributed in the hope that it will be useful, but
WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
conditions of the GNU General Public License cover the whole
combination.
As a special exception, the copyright holders of this library give you
permission to link this library with independent modules to produce an
executable, regardless of the license terms of these independent
modules, and to copy and distribute the resulting executable under
terms of your choice, provided that you also meet, for each linked
independent module, the terms and conditions of the license of that
module. An independent module is a module which is not derived from
or based on this library. If you modify this library, you may extend
this exception to your version of the library, but you are not
obligated to do so. If you do not wish to do so, delete this
exception statement from your version.