public void straight(double x,double y){
  double dx=x - pen.x;
  double dy=y - pen.y;
  if (convertToTwips) {
    dx*=SwfConstants.TWIPS_PER_PIXEL;
    dy*=SwfConstants.TWIPS_PER_PIXEL;
  }
  if (dx == 0 && dy == 0) {
    return;
  }
 else {
    int intdx=(int)Math.rint(dx);
    int intdy=(int)Math.rint(dy);
    addLineSubdivideAware(intdx,intdy);
    pen.x=x;
    pen.y=y;
    dxSumTwips+=intdx;
    dySumTwips+=intdy;
  }
}

public void straight ( double x , double y ) { double dx = x - pen . x ; double dy = y - pen . y ; if ( convertToTwips ) { dx *= SwfConstants . TWIPS_PER_PIXEL ; dy *= SwfConstants . TWIPS_PER_PIXEL ; } if ( dx == 0 && dy == 0 ) { return ; } else { int intdx = ( int ) Math . rint ( dx ) ; int intdy = ( int ) Math . rint ( dy ) ; addLineSubdivideAware ( intdx , intdy ) ; pen . x = x ; pen . y = y ; dxSumTwips += intdx ; dySumTwips += intdy ; } }
calculates the change or ' delta ' in position between the current pen location and a given co - ordinate pair . this delta is used to create a straight - edge shape record in swf , i . e . a simple line .
