Package org.eclipse.draw2d.geometry
Class PrecisionPointList
java.lang.Object
org.eclipse.draw2d.geometry.PointList
org.eclipse.draw2d.geometry.PrecisionPointList
- All Implemented Interfaces:
Serializable,Translatable
A PointList implementation using floating point values which are truncated
into the inherited integer fields. The use of floating point prevents
rounding errors from accumulating.
EXPERIMENTAL This class has been added as part of a work in
progress and there is no guarantee that this API will remain unchanged. This
is likely to not function properly outside some very specific use-cases.
- Since:
- 3.21
- See Also:
- @noreference
- This class is not intended to be referenced by clients.
-
Constructor Summary
ConstructorsConstructorDescriptionPrecisionPointList(int[] points) Constructs a PrecisionPointList with the given points.PrecisionPointList(PointList points) Constructs a PrecisionPointList with the given points. -
Method Summary
Modifier and TypeMethodDescriptionvoidperformScale(double factor) Scales this object by the scale factor.Methods inherited from class org.eclipse.draw2d.geometry.PointList
addAll, addPoint, addPoint, getBounds, getCopy, getFirstPoint, getLastPoint, getMidpoint, getPoint, getPoint, insertPoint, intersects, performTranslate, polygonContainsPoint, polylineContainsPoint, removeAllPoints, removePoint, reverse, setPoint, setSize, size, toIntArray, translate, translate, transposeMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.eclipse.draw2d.geometry.Translatable
performTranslate, performTranslate, performTranslate
-
Constructor Details
-
PrecisionPointList
public PrecisionPointList(int[] points) Constructs a PrecisionPointList with the given points.- Parameters:
points- int array where two consecutive ints form the coordinates of a point
-
PrecisionPointList
Constructs a PrecisionPointList with the given points.- Parameters:
points- PointList from which the initial values are taken
-
-
Method Details
-
performScale
public void performScale(double factor) Description copied from interface:TranslatableScales this object by the scale factor.- Specified by:
performScalein interfaceTranslatable- Overrides:
performScalein classPointList- Parameters:
factor- The scale factor- See Also:
-