Class Line2D

java.lang.Object
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
  • Constructor Details

    • Line2D

      protected Line2D()
  • Method Details

    • 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