

PREV CLASS NEXT CLASS  FRAMES NO FRAMES  
SUMMARY: NESTED  FIELD  CONSTR  METHOD  DETAIL: FIELD  CONSTR  METHOD 
public interface CubicFlatnessAlgorithm
Interface to be adopted by classes able to compute the flatness of cubic Bezier. Flatness: how well a cubic curve is approximated by a straight segment.
For some of the algorithms will be easier (less
computational expensive) to compute the square of the flatness,
for others the unsquared flatness will be preferred: the consumer of
a CubicFlatnessAlgorithm
's services can obtain which
way is the preferred one by calling the isSquaredFlatenessPreferred()
method.
Also, a flatness computation algorithm may or may not be robust in
concerning degenerate cubic Bezier curves (i.e. curves with all the
points collinear): such cases may show a 0
flatness without
any warranty that, indeed, the curve can be approximated by the segment
connecting the anchor points. Whether this is the case or not can be
obtained by calling the isDegenerationRobust()
method.
Method Summary  

double 
getFlatness(java.awt.geom.CubicCurve2D curve)
Should return the value of the flatness for the provided curve. 
double 
getSquaredFlatness(java.awt.geom.CubicCurve2D curve)
Should return the value of the flatness for the provided curve. 
boolean 
isDegenerationRobust()
Must return true if the flatness is nonzero for any
cubic curve that is not equal with the segment connecting the
cubic's anchors (can handle degenerated cubic curves), false
otherwise. 
boolean 
isSquaredFlatenessPreferred()
Should return true if the squared flatness is computed
easier (i.e. 
Method Detail 

boolean isDegenerationRobust()
true
if the flatness is nonzero for any
cubic curve that is not equal with the segment connecting the
cubic's anchors (can handle degenerated cubic curves), false
otherwise.
boolean isSquaredFlatenessPreferred()
true
if the squared flatness is computed
easier (i.e. less CPU expensive) than the flatness.
double getFlatness(java.awt.geom.CubicCurve2D curve)
double getSquaredFlatness(java.awt.geom.CubicCurve2D curve)


PREV CLASS NEXT CLASS  FRAMES NO FRAMES  
SUMMARY: NESTED  FIELD  CONSTR  METHOD  DETAIL: FIELD  CONSTR  METHOD 