edu.umd.cs.piccolox.util
Class LineShape

java.lang.Object
  extended by edu.umd.cs.piccolox.util.LineShape
All Implemented Interfaces:
MutablePoints, Points, java.awt.Shape

public class LineShape
extends java.lang.Object
implements java.awt.Shape, MutablePoints


Constructor Summary
LineShape(MutablePoints points)
           
 
Method Summary
 void addPoint(int pos, double x, double y)
           
 boolean contains(double x, double y)
           
 boolean contains(double x, double y, double d)
           
 boolean contains(double x, double y, double w, double h)
           
static boolean contains(double x, double y, double x1, double y1, double x2, double y2, boolean min, boolean max, double d)
           
 boolean contains(java.awt.geom.Point2D p)
           
 boolean contains(java.awt.geom.Rectangle2D r)
           
 java.awt.Rectangle getBounds()
           
 java.awt.geom.Rectangle2D getBounds(java.awt.geom.Rectangle2D dst)
           
 java.awt.geom.Rectangle2D getBounds2D()
           
 java.awt.geom.PathIterator getPathIterator(java.awt.geom.AffineTransform at)
           
 java.awt.geom.PathIterator getPathIterator(java.awt.geom.AffineTransform at, double flatness)
           
 java.awt.geom.Point2D getPoint(int i, java.awt.geom.Point2D dst)
           
 int getPointCount()
           
 double getX(int i)
           
 double getY(int i)
           
 boolean intersects(double x, double y, double w, double h)
           
static boolean intersects(double x1, double y1, double x2, double y2, double x3, double y3, double x4, double y4, boolean min1, boolean max1, boolean min2, boolean max2)
           
 boolean intersects(java.awt.geom.Rectangle2D r)
           
 void removePoints(int pos, int num)
           
 void setPoint(int i, double x, double y)
           
 void setPoints(MutablePoints points)
           
 void transformPoints(java.awt.geom.AffineTransform trans)
           
 void updateBounds()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

LineShape

public LineShape(MutablePoints points)
Method Detail

setPoints

public void setPoints(MutablePoints points)

getPointCount

public int getPointCount()
Specified by:
getPointCount in interface Points

getX

public double getX(int i)
Specified by:
getX in interface Points

getY

public double getY(int i)
Specified by:
getY in interface Points

getPoint

public java.awt.geom.Point2D getPoint(int i,
                                      java.awt.geom.Point2D dst)
Specified by:
getPoint in interface Points

getBounds

public java.awt.geom.Rectangle2D getBounds(java.awt.geom.Rectangle2D dst)
Specified by:
getBounds in interface Points

updateBounds

public void updateBounds()

setPoint

public void setPoint(int i,
                     double x,
                     double y)
Specified by:
setPoint in interface MutablePoints

addPoint

public void addPoint(int pos,
                     double x,
                     double y)
Specified by:
addPoint in interface MutablePoints

removePoints

public void removePoints(int pos,
                         int num)
Specified by:
removePoints in interface MutablePoints

transformPoints

public void transformPoints(java.awt.geom.AffineTransform trans)
Specified by:
transformPoints in interface MutablePoints

getBounds

public java.awt.Rectangle getBounds()
Specified by:
getBounds in interface java.awt.Shape

getBounds2D

public java.awt.geom.Rectangle2D getBounds2D()
Specified by:
getBounds2D in interface java.awt.Shape

contains

public static boolean contains(double x,
                               double y,
                               double x1,
                               double y1,
                               double x2,
                               double y2,
                               boolean min,
                               boolean max,
                               double d)

contains

public boolean contains(double x,
                        double y,
                        double d)

contains

public boolean contains(double x,
                        double y)
Specified by:
contains in interface java.awt.Shape

contains

public boolean contains(java.awt.geom.Point2D p)
Specified by:
contains in interface java.awt.Shape

intersects

public static boolean intersects(double x1,
                                 double y1,
                                 double x2,
                                 double y2,
                                 double x3,
                                 double y3,
                                 double x4,
                                 double y4,
                                 boolean min1,
                                 boolean max1,
                                 boolean min2,
                                 boolean max2)

intersects

public boolean intersects(double x,
                          double y,
                          double w,
                          double h)
Specified by:
intersects in interface java.awt.Shape

intersects

public boolean intersects(java.awt.geom.Rectangle2D r)
Specified by:
intersects in interface java.awt.Shape

contains

public boolean contains(double x,
                        double y,
                        double w,
                        double h)
Specified by:
contains in interface java.awt.Shape

contains

public boolean contains(java.awt.geom.Rectangle2D r)
Specified by:
contains in interface java.awt.Shape

getPathIterator

public java.awt.geom.PathIterator getPathIterator(java.awt.geom.AffineTransform at)
Specified by:
getPathIterator in interface java.awt.Shape

getPathIterator

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


Copyright 2005 by University of Maryland, College Park, MD 20742, USA All rights reserved.

Web Accessibility