protected void writeShape(SWFShape shape) throws IOException {
  for (Iterator it=elements.iterator(); it.hasNext(); ) {
    Object el=it.next();
    if (el instanceof Shape.ColorFill) {
      Shape.ColorFill fill=(Shape.ColorFill)el;
      shape.defineFillStyle(fill.getColor());
    }
 else     if (el instanceof Shape.ImageFill) {
      Shape.ImageFill fill=(Shape.ImageFill)el;
      Symbol image=fill.getImage();
      int imgId=(image != null) ? image.getId() : 65535;
      shape.defineFillStyle(imgId,fill.getTransform(),fill.isClipped());
    }
 else     if (el instanceof Shape.GradientFill) {
      Shape.GradientFill fill=(Shape.GradientFill)el;
      shape.defineFillStyle(fill.getTransform(),fill.getRatios(),fill.getColors(),fill.isRadial());
    }
 else     if (el instanceof Shape.LineStyle) {
      Shape.LineStyle style=(Shape.LineStyle)el;
      shape.defineLineStyle((int)(style.getWidth() * SWFConstants.TWIPS),style.getColor());
    }
 else     if (el instanceof Shape.SetLeftFillStyle) {
      Shape.SetLeftFillStyle style=(Shape.SetLeftFillStyle)el;
      shape.setFillStyle0(style.getStyleIndex());
    }
 else     if (el instanceof Shape.SetRightFillStyle) {
      Shape.SetRightFillStyle style=(Shape.SetRightFillStyle)el;
      shape.setFillStyle1(style.getStyleIndex());
    }
 else     if (el instanceof Shape.SetLineStyle) {
      Shape.SetLineStyle style=(Shape.SetLineStyle)el;
      shape.setLineStyle(style.getStyleIndex());
    }
 else {
      writeVector(shape,el);
    }
  }
  shape.done();
}

protected void writeShape ( SWFShape shape ) throws IOException { for ( Iterator it = elements . iterator ( ) ; it . hasNext ( ) ; ) { Object el = it . next ( ) ; if ( el instanceof Shape . ColorFill ) { Shape . ColorFill fill = ( Shape . ColorFill ) el ; shape . defineFillStyle ( fill . getColor ( ) ) ; } else if ( el instanceof Shape . ImageFill ) { Shape . ImageFill fill = ( Shape . ImageFill ) el ; Symbol image = fill . getImage ( ) ; int imgId = ( image != null ) ? image . getId ( ) : 65535 ; shape . defineFillStyle ( imgId , fill . getTransform ( ) , fill . isClipped ( ) ) ; } else if ( el instanceof Shape . GradientFill ) { Shape . GradientFill fill = ( Shape . GradientFill ) el ; shape . defineFillStyle ( fill . getTransform ( ) , fill . getRatios ( ) , fill . getColors ( ) , fill . isRadial ( ) ) ; } else if ( el instanceof Shape . LineStyle ) { Shape . LineStyle style = ( Shape . LineStyle ) el ; shape . defineLineStyle ( ( int ) ( style . getWidth ( ) * SWFConstants . TWIPS ) , style . getColor ( ) ) ; } else if ( el instanceof Shape . SetLeftFillStyle ) { Shape . SetLeftFillStyle style = ( Shape . SetLeftFillStyle ) el ; shape . setFillStyle0 ( style . getStyleIndex ( ) ) ; } else if ( el instanceof Shape . SetRightFillStyle ) { Shape . SetRightFillStyle style = ( Shape . SetRightFillStyle ) el ; shape . setFillStyle1 ( style . getStyleIndex ( ) ) ; } else if ( el instanceof Shape . SetLineStyle ) { Shape . SetLineStyle style = ( Shape . SetLineStyle ) el ; shape . setLineStyle ( style . getStyleIndex ( ) ) ; } else { writeVector ( shape , el ) ; } } shape . done ( ) ; }
description of the method
