public abstract class Line2D extends Object implements Shape, Cloneable
Modifier and Type | Class and Description |
---|---|
static class |
Line2D.Double |
static class |
Line2D.Float |
Modifier | Constructor and Description |
---|---|
protected |
Line2D() |
Modifier and Type | Method and Description |
---|---|
Object |
clone() |
boolean |
contains(double px, double py) |
boolean |
contains(double rx, double ry, double rw, double rh) |
boolean |
contains(Point2D p) |
boolean |
contains(Rectangle2D r) |
Rectangle |
getBounds() |
abstract Point2D |
getP1() |
abstract Point2D |
getP2() |
PathIterator |
getPathIterator(AffineTransform at) |
PathIterator |
getPathIterator(AffineTransform at, double flatness) |
abstract double |
getX1() |
abstract double |
getX2() |
abstract double |
getY1() |
abstract double |
getY2() |
boolean |
intersects(double rx, double ry, double rw, double rh) |
boolean |
intersects(Rectangle2D r) |
boolean |
intersectsLine(double x1, double y1, double x2, double y2) |
boolean |
intersectsLine(Line2D l) |
static boolean |
linesIntersect(double x1, double y1, double x2, double y2, double x3, double y3, double x4, double y4) |
double |
ptLineDist(double px, double py) |
static double |
ptLineDist(double x1, double y1, double x2, double y2, double px, double py) |
double |
ptLineDist(Point2D p) |
double |
ptLineDistSq(double px, double py) |
static double |
ptLineDistSq(double x1, double y1, double x2, double y2, double px, double py) |
double |
ptLineDistSq(Point2D p) |
double |
ptSegDist(double px, double py) |
static double |
ptSegDist(double x1, double y1, double x2, double y2, double px, double py) |
double |
ptSegDist(Point2D p) |
double |
ptSegDistSq(double px, double py) |
static double |
ptSegDistSq(double x1, double y1, double x2, double y2, double px, double py) |
double |
ptSegDistSq(Point2D p) |
int |
relativeCCW(double px, double py) |
static int |
relativeCCW(double x1, double y1, double x2, double y2, double px, double py) |
int |
relativeCCW(Point2D p) |
abstract void |
setLine(double x1, double y1, double x2, double y2) |
void |
setLine(Line2D line) |
void |
setLine(Point2D p1, Point2D p2) |
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
getBounds2D
public abstract double getX1()
public abstract double getY1()
public abstract double getX2()
public abstract double getY2()
public abstract Point2D getP1()
public abstract Point2D getP2()
public abstract void setLine(double x1, double y1, double x2, double y2)
public void setLine(Line2D line)
public static int relativeCCW(double x1, double y1, double x2, double y2, double px, double py)
public int relativeCCW(double px, double py)
public int relativeCCW(Point2D p)
public static boolean linesIntersect(double x1, double y1, double x2, double y2, double x3, double y3, double x4, double y4)
public boolean intersectsLine(double x1, double y1, double x2, double y2)
public boolean intersectsLine(Line2D l)
public static double ptSegDistSq(double x1, double y1, double x2, double y2, double px, double py)
public static double ptSegDist(double x1, double y1, double x2, double y2, double px, double py)
public double ptSegDistSq(double px, double py)
public double ptSegDistSq(Point2D p)
public double ptSegDist(double px, double py)
public double ptSegDist(Point2D p)
public static double ptLineDistSq(double x1, double y1, double x2, double y2, double px, double py)
public static double ptLineDist(double x1, double y1, double x2, double y2, double px, double py)
public double ptLineDistSq(double px, double py)
public double ptLineDistSq(Point2D p)
public double ptLineDist(double px, double py)
public double ptLineDist(Point2D p)
public boolean contains(Rectangle2D r)
public boolean contains(double rx, double ry, double rw, double rh)
public boolean intersects(double rx, double ry, double rw, double rh)
intersects
in interface Shape
public boolean intersects(Rectangle2D r)
intersects
in interface Shape
public PathIterator getPathIterator(AffineTransform at)
getPathIterator
in interface Shape
public PathIterator getPathIterator(AffineTransform at, double flatness)
getPathIterator
in interface Shape
Copyright © 1998–2018. All rights reserved.