diff --git a/src/java/com/threerings/media/image/CachedVolatileMirage.java b/src/java/com/threerings/media/image/CachedVolatileMirage.java index c4680af1..5e65d6cc 100644 --- a/src/java/com/threerings/media/image/CachedVolatileMirage.java +++ b/src/java/com/threerings/media/image/CachedVolatileMirage.java @@ -72,7 +72,11 @@ public class CachedVolatileMirage extends VolatileMirage BufferedImage source = _imgr.getImage(_source, _zations); if (source != null) { gfx = _image.getGraphics(); - gfx.drawImage(source, -_bounds.x, -_bounds.y, null); + // We grab a subimage before drawing because otherwise bufferedimage does all its + // computations across the entire image, including those parts outside the bounds. + BufferedImage subImg = + source.getSubimage(_bounds.x, _bounds.y, _bounds.width, _bounds.height); + gfx.drawImage(subImg, 0, 0, null); } } catch (Exception e) {