public static void write(OMPoly poly,Link link,LinkProperties props) throws IOException {
switch (poly.getRenderType()) {
case OMPoly.RENDERTYPE_LATLON:
    write(poly.getLatLonArray(),OMPoly.RADIANS,poly.getLineType(),poly.getNumSegs(),props,link.dos);
  break;
case OMPoly.RENDERTYPE_XY:
write(poly.getXs(),poly.getYs(),props,link.dos);
break;
case OMPoly.RENDERTYPE_OFFSET:
write((float)poly.getLat(),(float)poly.getLon(),poly.getXs(),poly.getYs(),poly.getCoordMode(),props,link.dos);
break;
default :
Debug.error("LinkPoly.write: poly rendertype unknown.");
}
}

public static void write ( OMPoly poly , Link link , LinkProperties props ) throws IOException { switch ( poly . getRenderType ( ) ) { case OMPoly . RENDERTYPE_LATLON : write ( poly . getLatLonArray ( ) , OMPoly . RADIANS , poly . getLineType ( ) , poly . getNumSegs ( ) , props , link . dos ) ; break ; case OMPoly . RENDERTYPE_XY : write ( poly . getXs ( ) , poly . getYs ( ) , props , link . dos ) ; break ; case OMPoly . RENDERTYPE_OFFSET : write ( ( float ) poly . getLat ( ) , ( float ) poly . getLon ( ) , poly . getXs ( ) , poly . getYs ( ) , poly . getCoordMode ( ) , props , link . dos ) ; break ; default : Debug . error ( "LinkPoly.write: poly rendertype unknown." ) ; } }
write a poly to the link .
