public static final class InteriorAngleLinePathConnector.Minimize extends InteriorAngleLinePathConnector
InteriorAngleLinePathConnector
that chooses line subset
connections that produce the smallest interior angles. Another way to visualize this is
that when presented multiple connection options for a given line subset, this class will
choose the option that points most to the left when viewed in the direction of the incoming
line subset.InteriorAngleLinePathConnector.Maximize, InteriorAngleLinePathConnector.Minimize
AbstractLinePathConnector.ConnectableLineSubset
AbstractPathConnector.ConnectableElement<E extends AbstractPathConnector.ConnectableElement<E>>
Constructor and Description |
---|
Minimize() |
Modifier and Type | Method and Description |
---|---|
protected boolean |
isBetterAngle(double newAngle,
double previousAngle)
Return true if
newAngle represents a better interior angle than previousAngle . |
connectMaximized, connectMinimized, selectConnection
add, add, connect, connectAll, connectAll
addPathElement, computePathRoots, connectPathElements, selectPointConnection
public Minimize()
protected boolean isBetterAngle(double newAngle, double previousAngle)
newAngle
represents a better interior angle than previousAngle
.isBetterAngle
in class InteriorAngleLinePathConnector
newAngle
- the new angle under considerationpreviousAngle
- the previous best anglenewAngle
represents a better interior angle than previousAngle
Copyright © 2016–2021 The Apache Software Foundation. All rights reserved.