}
/**
*/
public void drawGeoPrimitive(Graphics g, GeoPrimitive geoPrim) {
Rectangle boundingRect = geoPrim.getBoundingRect();
// Do this in a more efficient way
Rectangle viewRect = new Rectangle(quadMap.getViewportPosition(),
quadMap.getViewportPosition().add(quadMap.getViewportSize()));
Properties properties = quadMap.getProperties();
Coordinate dScroll = new Coordinate(properties.getScrollSize().x , 0);
// The leftmost coordinate we want to use for testing if viewRect
// contains it.
Coordinate testCoord = geoPrim.getBoundingRect().getTopLeftCorner();
while (testCoord.x <= viewRect.getX2()) {
geoPrim.paint(g, (Coordinate)(viewRect.getTopLeftCorner().clone()));
testCoord = testCoord.add(dScroll);
geoPrim.addOffset(dScroll);
}
}