com.itextpdf.awt.geom
Class Line2D

java.lang.Object
  extended by com.itextpdf.awt.geom.Line2D
All Implemented Interfaces:
Shape, Cloneable
Direct Known Subclasses:
Line2D.Double, Line2D.Float

public abstract class Line2D
extends Object
implements Shape, Cloneable


Nested Class Summary
static class Line2D.Double
           
static class Line2D.Float
           
 
Constructor Summary
protected Line2D()
           
 
Method Summary
 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)
           
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface com.itextpdf.awt.geom.Shape
getBounds2D
 

Constructor Detail

Line2D

protected Line2D()
Method Detail

getX1

public abstract double getX1()

getY1

public abstract double getY1()

getX2

public abstract double getX2()

getY2

public abstract double getY2()

getP1

public abstract Point2D getP1()

getP2

public abstract Point2D getP2()

setLine

public abstract void setLine(double x1,
                             double y1,
                             double x2,
                             double y2)

setLine

public void setLine(Point2D p1,
                    Point2D p2)

setLine

public void setLine(Line2D line)

getBounds

public Rectangle getBounds()
Specified by:
getBounds in interface Shape

relativeCCW

public static int relativeCCW(double x1,
                              double y1,
                              double x2,
                              double y2,
                              double px,
                              double py)

relativeCCW

public int relativeCCW(double px,
                       double py)

relativeCCW

public int relativeCCW(Point2D p)

linesIntersect

public static boolean linesIntersect(double x1,
                                     double y1,
                                     double x2,
                                     double y2,
                                     double x3,
                                     double y3,
                                     double x4,
                                     double y4)

intersectsLine

public boolean intersectsLine(double x1,
                              double y1,
                              double x2,
                              double y2)

intersectsLine

public boolean intersectsLine(Line2D l)

ptSegDistSq

public static double ptSegDistSq(double x1,
                                 double y1,
                                 double x2,
                                 double y2,
                                 double px,
                                 double py)

ptSegDist

public static double ptSegDist(double x1,
                               double y1,
                               double x2,
                               double y2,
                               double px,
                               double py)

ptSegDistSq

public double ptSegDistSq(double px,
                          double py)

ptSegDistSq

public double ptSegDistSq(Point2D p)

ptSegDist

public double ptSegDist(double px,
                        double py)

ptSegDist

public double ptSegDist(Point2D p)

ptLineDistSq

public static double ptLineDistSq(double x1,
                                  double y1,
                                  double x2,
                                  double y2,
                                  double px,
                                  double py)

ptLineDist

public static double ptLineDist(double x1,
                                double y1,
                                double x2,
                                double y2,
                                double px,
                                double py)

ptLineDistSq

public double ptLineDistSq(double px,
                           double py)

ptLineDistSq

public double ptLineDistSq(Point2D p)

ptLineDist

public double ptLineDist(double px,
                         double py)

ptLineDist

public double ptLineDist(Point2D p)

contains

public boolean contains(double px,
                        double py)
Specified by:
contains in interface Shape

contains

public boolean contains(Point2D p)
Specified by:
contains in interface Shape

contains

public boolean contains(Rectangle2D r)
Specified by:
contains in interface Shape

contains

public boolean contains(double rx,
                        double ry,
                        double rw,
                        double rh)
Specified by:
contains in interface Shape

intersects

public boolean intersects(double rx,
                          double ry,
                          double rw,
                          double rh)
Specified by:
intersects in interface Shape

intersects

public boolean intersects(Rectangle2D r)
Specified by:
intersects in interface Shape

getPathIterator

public PathIterator getPathIterator(AffineTransform at)
Specified by:
getPathIterator in interface Shape

getPathIterator

public PathIterator getPathIterator(AffineTransform at,
                                    double flatness)
Specified by:
getPathIterator in interface Shape

clone

public Object clone()
Overrides:
clone in class Object


Copyright © 2013. All Rights Reserved.