protected void drawPolygon(Polygon polygon,Color fillColor,Paint fillPaint,Color penColor,boolean shadow){
  if (fillColor != null || fillPaint != null) {
    if (shadow) {
      g.setColor(mxConstants.SHADOW_COLOR);
      g.translate(mxConstants.SHADOW_OFFSETX,mxConstants.SHADOW_OFFSETY);
      g.fillPolygon(polygon);
      g.translate(-mxConstants.SHADOW_OFFSETX,-mxConstants.SHADOW_OFFSETY);
    }
    if (fillPaint != null) {
      g.setPaint(fillPaint);
    }
 else {
      g.setColor(fillColor);
    }
    g.fillPolygon(polygon);
  }
  if (penColor != null) {
    g.setColor(penColor);
    g.drawPolygon(polygon);
  }
}

protected void drawPolygon ( Polygon polygon , Color fillColor , Paint fillPaint , Color penColor , boolean shadow ) { if ( fillColor != null || fillPaint != null ) { if ( shadow ) { g . setColor ( mxConstants . SHADOW_COLOR ) ; g . translate ( mxConstants . SHADOW_OFFSETX , mxConstants . SHADOW_OFFSETY ) ; g . fillPolygon ( polygon ) ; g . translate ( - mxConstants . SHADOW_OFFSETX , - mxConstants . SHADOW_OFFSETY ) ; } if ( fillPaint != null ) { g . setPaint ( fillPaint ) ; } else { g . setColor ( fillColor ) ; } g . fillPolygon ( polygon ) ; } if ( penColor != null ) { g . setColor ( penColor ) ; g . drawPolygon ( polygon ) ; } }
draws a a polygon for the given parameters .
