private int[] addCurveSubdivideAware(double[] curve){
  int[] delta=curveDeltas(curve);
  if (exceedsEdgeRecordLimit(delta)) {
    double[] left=new double[6];
    double[] right=new double[6];
    divideQuad(curve,0,left,0,right,0);
    int[] deltaLeft=curveDeltas(left);
    int[] deltaRight=curveDeltas(right);
    if (exceedsEdgeRecordLimit(deltaLeft)) {
      addCurveSubdivideAware(left);
    }
 else {
      curveRecord(deltaLeft);
    }
    if (exceedsEdgeRecordLimit(deltaRight)) {
      addCurveSubdivideAware(right);
    }
 else {
      curveRecord(deltaRight);
    }
  }
 else {
    curveRecord(delta);
  }
  return delta;
}

private int [ ] addCurveSubdivideAware ( double [ ] curve ) { int [ ] delta = curveDeltas ( curve ) ; if ( exceedsEdgeRecordLimit ( delta ) ) { double [ ] left = new double [ 6 ] ; double [ ] right = new double [ 6 ] ; divideQuad ( curve , 0 , left , 0 , right , 0 ) ; int [ ] deltaLeft = curveDeltas ( left ) ; int [ ] deltaRight = curveDeltas ( right ) ; if ( exceedsEdgeRecordLimit ( deltaLeft ) ) { addCurveSubdivideAware ( left ) ; } else { curveRecord ( deltaLeft ) ; } if ( exceedsEdgeRecordLimit ( deltaRight ) ) { addCurveSubdivideAware ( right ) ; } else { curveRecord ( deltaRight ) ; } } else { curveRecord ( delta ) ; } return delta ; }
recursively draws smaller sub - sections of a curve until the control - anchor point delta values fit into a swf edgerecord .
