private void addMitreJoin(Coordinate p,LineSegment offset0,LineSegment offset1,double distance){
  boolean isMitreWithinLimit=true;
  Coordinate intPt=null;
  try {
    intPt=HCoordinate.intersection(offset0.p0,offset0.p1,offset1.p0,offset1.p1);
    double mitreRatio=distance <= 0.0 ? 1.0 : intPt.distance(p) / Math.abs(distance);
    if (mitreRatio > bufParams.getMitreLimit())     isMitreWithinLimit=false;
  }
 catch (  NotRepresentableException ex) {
    intPt=new Coordinate(0,0);
    isMitreWithinLimit=false;
  }
  if (isMitreWithinLimit) {
    segList.addPt(intPt);
  }
 else {
    addLimitedMitreJoin(offset0,offset1,distance,bufParams.getMitreLimit());
  }
}

private void addMitreJoin ( Coordinate p , LineSegment offset0 , LineSegment offset1 , double distance ) { boolean isMitreWithinLimit = true ; Coordinate intPt = null ; try { intPt = HCoordinate . intersection ( offset0 . p0 , offset0 . p1 , offset1 . p0 , offset1 . p1 ) ; double mitreRatio = distance <= 0.0 ? 1.0 : intPt . distance ( p ) / Math . abs ( distance ) ; if ( mitreRatio > bufParams . getMitreLimit ( ) ) isMitreWithinLimit = false ; } catch ( NotRepresentableException ex ) { intPt = new Coordinate ( 0 , 0 ) ; isMitreWithinLimit = false ; } if ( isMitreWithinLimit ) { segList . addPt ( intPt ) ; } else { addLimitedMitreJoin ( offset0 , offset1 , distance , bufParams . getMitreLimit ( ) ) ; } }
adds a mitre join connecting the two reflex offset segments . the mitre will be beveled if it exceeds the mitre ratio limit .
