protected void paintDirtyItems (Graphics2D gfx, Rectangle clip)
    {
        // add any sprites impacted by the dirty rectangle
        _dirtySprites.clear();
        _spritemgr.getIntersectingSprites(_dirtySprites, clip);
        int size = _dirtySprites.size();
        for (int ii = 0; ii < size; ii++) {
            Sprite sprite = _dirtySprites.get(ii);
            Rectangle bounds = sprite.getBounds();
            if (!bounds.intersects(clip)) {
                continue;
            }
            appendDirtySprite(_dirtyItems, sprite);
//             Log.info("Dirtied item: " + sprite);
        }

        // add any objects impacted by the dirty rectangle
        for (SceneObject scobj : _vizobjs) {
            if (!scobj.bounds.intersects(clip)) {
                continue;
            }
            _dirtyItems.appendDirtyObject(scobj);
//             Log.info("Dirtied item: " + scobj);
        }

//         Log.info("paintDirtyItems [items=" + _dirtyItems.size() + "].");

        // sort the dirty items so that we can paint them back-to-front
        _dirtyItems.sort();
        _dirtyItems.paintAndClear(gfx);
    }
protected void paintDirtyItems ( Graphics2D gfx , Rectangle clip ) { _dirtySprites . clear ( ) ; _spritemgr . getIntersectingSprites ( _dirtySprites , clip ) ; int size = _dirtySprites . size ( ) ; for ( int ii = 0 ; ii < size ; ii ++ ) { Sprite sprite = _dirtySprites . get ( ii ) ; Rectangle bounds = sprite . getBounds ( ) ; if ( ! bounds . intersects ( clip ) ) { continue ; } appendDirtySprite ( _dirtyItems , sprite ) ; } for ( SceneObject scobj : _vizobjs ) { if ( ! scobj . bounds . intersects ( clip ) ) { continue ; } _dirtyItems . appendDirtyObject ( scobj ) ; } _dirtyItems . sort ( ) ; _dirtyItems . paintAndClear ( gfx ) ; }
Renders the dirty sprites and objects in the scene to the given graphics context.