Static Public Member Functions | |
| static Polygon | createPolygon (Point2D...points) |
| Creates a polygon from an array of points. | |
| static RenderingHints | getBestRenderingHints () |
| static String | getPathAsString (PathIterator pathIterator) |
| static Point2D[] | getPointsRecentered (Point2D[] points, double originX, double originY) |
| Recenter the points around x and y. | |
| static Point2D[] | getPointsWithConvertedUnits (Units sourceUnit, Units destUnit, Point2D...points) |
| Takes an input array of points, and returns a new array of points where all the values have been converted from the old unit to the new destination unit. | |
Definition at line 20 of file GraphicsUtils.java.
| static Polygon createPolygon | ( | Point2D... | points | ) | [static] |
Creates a polygon from an array of points.
It rounds off all the points' x & y values to the nearest integer, as the Java Polygons only work with ints.
| points |
Definition at line 31 of file GraphicsUtils.java.
| static RenderingHints getBestRenderingHints | ( | ) | [static] |
Definition at line 43 of file GraphicsUtils.java.
| static String getPathAsString | ( | PathIterator | pathIterator | ) | [static] |
| static Point2D [] getPointsRecentered | ( | Point2D[] | points, | |
| double | originX, | |||
| double | originY | |||
| ) | [static] |
Recenter the points around x and y.
| points | each point will be recalculatd relative to the new origin. | |
| originX | the new originX | |
| originY |
Definition at line 101 of file GraphicsUtils.java.
| static Point2D [] getPointsWithConvertedUnits | ( | Units | sourceUnit, | |
| Units | destUnit, | |||
| Point2D... | points | |||
| ) | [static] |
Takes an input array of points, and returns a new array of points where all the values have been converted from the old unit to the new destination unit.
| sourceUnit | the input points are defined in this unit | |
| destUnit | the output Point2D[] is definited in this unit. | |
| points | the input points. |
Definition at line 122 of file GraphicsUtils.java.
References Units.getConversionTo().
1.4.7