}
return ya;
}
public void drawPolygon(Graphics2D g, Geometry geo,View view) {
Polygon pg = (Polygon) geo;
Ring shell = pg.getShell();
java.awt.Polygon shellPaht = createPolygon(shell,view);
//shellPaht.closePath();
Area area = new Area(shellPaht);
for (Ring r : pg.getHoles()) {
java.awt.Polygon holePath = createPolygon(r,view);
//holePath.closePath();
Area holeArea = new Area(holePath);
area.subtract(holeArea);
}
g.setStroke(style.getStroke());
if (style.isNeedArea()) {
g.setPaint(style.getAreaColor());
g.fill(area);
}
if (style.isNeedLine()) {
g.setPaint(style.getLineColor());
g.draw(area);
}
if (style.isNeedPoint()) {
drawPoints4Line(g, shell, style,view);
for (Ring r : pg.getHoles()) {
drawPoints4Line(g, r, style,view);
}
}
}