dstData.markDirty(); } /** * This is an alternate implementation for updating the cached * SurfaceData from the source (primary) SurfaceData using a * background color for transparent pixels. * A simple BlitBg is used to copy the pixels from the source to * the destination SurfaceData with the specified bgColor. * A subclass can override the normal updateSurfaceData method * and call this implementation instead if it wants to use color * keying for bitmask images. */ public void updateSurfaceDataBg(SurfaceData srcData, SurfaceData dstData, int w, int h, Color bgColor) { SurfaceType srcType = srcData.getSurfaceType(); SurfaceType dstType = dstData.getSurfaceType(); BlitBg blitbg = BlitBg.getFromCache(srcType, CompositeType.SrcNoEa, dstType); blitbg.BlitBg(srcData, dstData, AlphaComposite.Src, null, bgColor.getRGB(), 0, 0, 0, 0, w, h); dstData.markDirty(); }}Lines 501–528 of 528. Previous lines
dstData.markDirty(); } /** * This is an alternate implementation for updating the cached * SurfaceData from the source (primary) SurfaceData using a * background color for transparent pixels. * A simple BlitBg is used to copy the pixels from the source to * the destination SurfaceData with the specified bgColor. * A subclass can override the normal updateSurfaceData method * and call this implementation instead if it wants to use color * keying for bitmask images. */ public void updateSurfaceDataBg(SurfaceData srcData, SurfaceData dstData, int w, int h, Color bgColor) { SurfaceType srcType = srcData.getSurfaceType(); SurfaceType dstType = dstData.getSurfaceType(); BlitBg blitbg = BlitBg.getFromCache(srcType, CompositeType.SrcNoEa, dstType); blitbg.BlitBg(srcData, dstData, AlphaComposite.Src, null, bgColor.getRGB(), 0, 0, 0, 0, w, h); dstData.markDirty(); } }