public void render(StyleGroup group, Graphics2D g, Camera camera) {
setupRenderingPass(group, g, camera);
pushStyle(group, g, camera);
for (Element e : group.bulkElements()) {
GraphicElement ge = (GraphicElement) e;
if (camera.isVisible(ge))
renderElement(group, g, camera, ge);
else
elementInvisible(group, g, camera, ge);
}
if (group.hasDynamicElements()) {
for (Element e : group.dynamicElements()) {
GraphicElement ge = (GraphicElement) e;
if (camera.isVisible(ge)) {
if (!group.elementHasEvents(ge)) {
pushDynStyle(group, g, camera, ge);
renderElement(group, g, camera, ge);
}
} else {
elementInvisible(group, g, camera, ge);
}
}
}
if (group.hasEventElements()) {
for (ElementEvents event : group.elementsEvents()) {
GraphicElement ge = (GraphicElement) event.getElement();
if (camera.isVisible(ge)) {
event.activate();
pushStyle(group, g, camera);
renderElement(group, g, camera, ge);