Moved the calls to the various layer-painting methods to their own independent method.

git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@3660 542714f4-19e9-0310-aa3c-eee0fc999fb1
This commit is contained in:
Andrzej Kapolka
2005-07-23 01:30:35 +00:00
parent 694b7f0f98
commit 67d1ca90c4
+23 -14
View File
@@ -481,23 +481,32 @@ public class MediaPanel extends JComponent
// clip to this dirty region
clipToDirtyRegion(gfx, clip);
// paint the behind the scenes stuff
paintBehind(gfx, clip);
// paint back sprites and animations
paintBits(gfx, AnimationManager.BACK, clip);
// paint the between the scenes stuff
paintBetween(gfx, clip);
// paint front sprites and animations
paintBits(gfx, AnimationManager.FRONT, clip);
// paint anything in front
paintInFront(gfx, clip);
// paint the region
paintDirtyRect(gfx, clip);
}
}
/**
* Paints all the layers of the specified dirty region.
*/
protected void paintDirtyRect (Graphics2D gfx, Rectangle rect)
{
// paint the behind the scenes stuff
paintBehind(gfx, rect);
// paint back sprites and animations
paintBits(gfx, AnimationManager.BACK, rect);
// paint the between the scenes stuff
paintBetween(gfx, rect);
// paint front sprites and animations
paintBits(gfx, AnimationManager.FRONT, rect);
// paint anything in front
paintInFront(gfx, rect);
}
/**
* Called by the main rendering code to constrain this dirty rectangle
* to the bounds of the media panel. If a derived class is using dirty