public CoordinateSystem getCoordianteSystem() {
return _coordianteSystem;
}
public void render(final MapObject object, final GC gc) {
final MapObjectType type = object.getType();
final int bcol = _profile.getBorderColor(type);
final Color border = new Color(gc.getDevice(), (bcol & 0xff0000) >> 16,
(bcol & 0xff00) >> 8, bcol & 0xff);
final int fcol = _profile.getColor(type);
final Color bgcolor = new Color(gc.getDevice(), (fcol & 0xff0000) >> 16,
(fcol & 0xff00) >> 8, fcol & 0xff);
final int[] poly = new int[object.getNodes().size() * 2];
int idx = 0;
Point p;
for (final MapNodeRef point : object.getNodes()) {
p = calcPos(point.getNode().getLatitude(), point.getNode().getLongitude());
gc.setForeground(border);
gc.setBackground(bgcolor);
poly[idx++] = p.getX();
poly[idx++] = p.getY();
}
if (type.isClosed()) {
gc.fillPolygon(poly);
gc.drawPolygon(poly);
}
else {
gc.setLineWidth(5);