| 227 | | g.setColor( w.selected ? |
| 228 | | selectedColor : coloura); |
| 229 | | |
| 230 | | g.fillPolygon(polygon); |
| | 227 | boolean isVisible = true; |
| | 228 | if (polygon.getBounds().x > nc.getWidth()) isVisible = false; |
| | 229 | else if (polygon.getBounds().y > nc.getHeight()) isVisible = false; |
| | 230 | else if (polygon.getBounds().x + polygon.getBounds().width < 0) isVisible = false; |
| | 231 | else if (polygon.getBounds().y + polygon.getBounds().height < 0) isVisible = false; |
| | 232 | |
| | 233 | if (isVisible) { |
| | 234 | g.setColor( w.selected ? |
| | 235 | selectedColor : coloura); |
| | 236 | g.fillPolygon(polygon); |
| | 237 | } |