de.enough.polish.geometry2d
Class Enlarge2D
java.lang.Object
de.enough.polish.geometry2d.Enlarge2D
public class Enlarge2D
- extends Object
Enlarges various 2D geometrical entities (lines, polygons) by a given factor,
with respect to (0,0). If the entity to be enlarge is not centered on (0,0),
the offset between (0,0) and the various points of the entity will also increase.
The factor can be <1, in which case the entity will be shrunk (not enlarged).
Negative factors will produce mirror images.
- Author:
- Ovidiu Iliescu
|
Method Summary |
static void |
enlarge(Line2D line,
double factor)
Enlarges the specified line. |
static void |
enlarge(Polygon2D polygon,
double factor)
Enlarges the specified polygon. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Enlarge2D
public Enlarge2D()
enlarge
public static void enlarge(Line2D line,
double factor)
- Enlarges the specified line.
- Parameters:
line - to enlargefactor - the factor
enlarge
public static void enlarge(Polygon2D polygon,
double factor)
- Enlarges the specified polygon.
- Parameters:
polygon - to enlargefactor - the factor