Class PathOffsetApproximationProperties
ClipperOffset operations.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbooleanChecks whether floatMultiplier should be calculated dynamically.calculateOffsetMultiplierDynamically(boolean calculateDynamically) Specifies if floatMultiplier should be calculated dynamically.doubleGets arc tolerance which is the maximum difference between the true and the faceted representation of curves (arcs) in units.setArcTolerance(double arcTolerance) Sets arc tolerance which is the maximum difference between the true and the faceted representation of curves (arcs) in units.
-
Constructor Details
-
PathOffsetApproximationProperties
public PathOffsetApproximationProperties()Creates newPathOffsetApproximationPropertiesinstance.
-
-
Method Details
-
calculateOffsetMultiplierDynamically
public PathOffsetApproximationProperties calculateOffsetMultiplierDynamically(boolean calculateDynamically) Specifies if floatMultiplier should be calculated dynamically. Default value isfalse.When a document with line arts is being cleaned up, there are a lot of calculations with floating point numbers. All of them are translated into fixed point numbers by multiplying by this floatMultiplier coefficient. It is possible to dynamically adjust the preciseness of the calculations.
- Parameters:
-
calculateDynamically-trueif floatMultiplier should be calculated dynamically,falsefor default value specified byClipperBridge() - Returns:
-
this
PathOffsetApproximationPropertiesinstance
-
calculateOffsetMultiplierDynamically
public boolean calculateOffsetMultiplierDynamically()Checks whether floatMultiplier should be calculated dynamically.When a document with line arts is being cleaned up, there are a lot of calculations with floating point numbers. All of them are translated into fixed point numbers by multiplying by this floatMultiplier coefficient. It is possible to dynamically adjust the preciseness of the calculations.
- Returns:
-
trueif floatMultiplier should be calculated dynamically,falsefor default value
-
getArcTolerance
public double getArcTolerance()Gets arc tolerance which is the maximum difference between the true and the faceted representation of curves (arcs) in units. Used as the criterion of a good approximation of rounded line joins and line caps.Since flattened paths can never perfectly represent arcs, this field/property specifies a maximum acceptable imprecision (tolerance) when arcs are approximated in an offsetting operation. Smaller values will increase smoothness up to a point though at a cost of performance and in creating more vertices to construct the arc.
- Returns:
- arc tolerance specifying maximum difference between the true and the faceted representation of arcs
-
setArcTolerance
Sets arc tolerance which is the maximum difference between the true and the faceted representation of curves (arcs) in units. Used as the criterion of a good approximation of rounded line joins and line caps.Since flattened paths can never perfectly represent arcs, this field/property specifies a maximum acceptable imprecision (tolerance) when arcs are approximated in an offsetting operation. Smaller values will increase smoothness up to a point though at a cost of performance and in creating more vertices to construct the arc.
- Parameters:
-
arcTolerance- maximum difference between the true and the faceted representation of arcs - Returns:
-
this
PathOffsetApproximationPropertiesinstance
-