Enum PolylineStage
- All Implemented Interfaces:
Serializable
,Comparable<PolylineStage>
,java.lang.constant.Constable
Tells at which stage are the polylines represented by a Java2D
Shape
.
A set of polylines way still be under construction in PolylineBuffer
during iteration over pixel values, or the polylines may have been classified
as incomplete after iteration over a row, or the polylines may be final result.
This is used only for debugging purposes because end users should see only the final result.
This information allows StepsViewer
(in test package) to use different colors for different stages.
- Since:
- 1.3
- Version:
- 1.3
-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>>
-
Enum Constant Summary
Enum ConstantsEnum ConstantDescriptionThe polylines are under construction in variousPolylineBuffer
instances.The polylines are final result to be show to user.The polylines are no longer in the buffers filled by the iteration over pixel values, but are still incomplete. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescription(package private) final void
add
(Map<PolylineStage, Path2D> appendTo, double[] coordinates, int size) Adds coordinates to the specified map.(package private) final void
add
(Map<PolylineStage, Path2D> appendTo, Shape polylines) Adds polylines to the specified map.(package private) final void
Adds polylines in the values of the given map.private Path2D
destination
(Map<PolylineStage, Path2D> appendTo) Returns the destination where to write polylines for this stage.static PolylineStage
Returns the enum constant of this type with the specified name.static PolylineStage[]
values()
Returns an array containing the constants of this enum type, in the order they are declared.
-
Enum Constant Details
-
BUFFER
The polylines are under construction in variousPolylineBuffer
instances. This is the first stage, which happens during iteration over pixel values. -
FRAGMENT
The polylines are no longer in the buffers filled by the iteration over pixel values, but are still incomplete. It happens when, after finishing iteration over a row, some polylines will not be continued by iteration on the next row and those polylines have not yet been closed as polygons. Those polyline fragments are moved to a "pending" list, as they may be closed later after more polylines fragments become available. -
FINAL
The polylines are final result to be show to user.
-
-
Constructor Details
-
PolylineStage
private PolylineStage()
-
-
Method Details
-
values
Returns an array containing the constants of this enum type, in the order they are declared.- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)- Parameters:
name
- the name of the enum constant to be returned.- Returns:
- the enum constant with the specified name
- Throws:
IllegalArgumentException
- if this enum type has no constant with the specified nameNullPointerException
- if the argument is null
-
destination
Returns the destination where to write polylines for this stage.- Parameters:
appendTo
- map of path for different stages.- Returns:
- the path to use for writing polylines at this stage.
-
add
Adds coordinates to the specified map.- Parameters:
appendTo
- where to append the coordinates.coordinates
- (x,y) tuples to append, starting with the coordinate at index 0.size
- number of coordinates to add (twice the number of tuples).
-
add
Adds polylines in the values of the given map. Keys are ignored.- Parameters:
appendTo
- where to append the coordinates.partialPaths
- map of polylines to add.
-
add
Adds polylines to the specified map.- Parameters:
appendTo
- where to append the polylines.polylines
- the polylines to append to the map, ornull
if none.
-