aim4.util
Class GeomUtil

java.lang.Object
  extended by aim4.util.GeomUtil

public class GeomUtil
extends Object

Utility methods for geometric manipulation.


Method Summary
 Shape convertArcIntoFan(Arc2D arc, double halfWidth)
          Convert an arc into a fan (i.e., an arc-shape shape with width)
 Shape convertLineIntoRectangle(Line2D line, double halfWidth)
          Convert a line into a rectangle
static Shape convertPointsToShape(Point2D[] points)
          Construct a shape out of a set of corner points.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

convertLineIntoRectangle

public Shape convertLineIntoRectangle(Line2D line,
                                      double halfWidth)
Convert a line into a rectangle

Parameters:
line - the line
halfWidth - half of the width of the rectangle
Returns:
the rectangle

convertArcIntoFan

public Shape convertArcIntoFan(Arc2D arc,
                               double halfWidth)
Convert an arc into a fan (i.e., an arc-shape shape with width)

Parameters:
arc - the arc
halfWidth - half of the width of the fan
Returns:
the fan

convertPointsToShape

public static Shape convertPointsToShape(Point2D[] points)
Construct a shape out of a set of corner points.

Parameters:
points - a set of points at the corners of the shape
Returns:
the shape


Copyright © 2011. All Rights Reserved.