sun.java2d.loops.BlitBg Java Examples

The following examples show how to use sun.java2d.loops.BlitBg. You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: X11PMBlitBgLoops.java    From dragonwell8_jdk with GNU General Public License v2.0 6 votes vote down vote up
@Override
public void BlitBg(SurfaceData src, SurfaceData dst,
                   Composite comp, Region clip, int bgColor,
                   int sx, int sy,
                   int dx, int dy,
                   int w, int h)
{
    SunToolkit.awtLock();
    try {
        int pixel = dst.pixelFor(bgColor);
        X11SurfaceData x11sd = (X11SurfaceData)dst;
        // use false for needExposures since we clip to the pixmap
        long xgc = x11sd.getBlitGC(clip, false);
        nativeBlitBg(src.getNativeOps(), dst.getNativeOps(),
                     xgc, pixel,
                     sx, sy, dx, dy, w, h);
    } finally {
        SunToolkit.awtUnlock();
    }
}
 
Example #2
Source File: X11PMBlitBgLoops.java    From jdk8u-dev-jdk with GNU General Public License v2.0 6 votes vote down vote up
@Override
public void BlitBg(SurfaceData src, SurfaceData dst,
                   Composite comp, Region clip, int bgColor,
                   int sx, int sy,
                   int dx, int dy,
                   int w, int h)
{
    SunToolkit.awtLock();
    try {
        int pixel = dst.pixelFor(bgColor);
        X11SurfaceData x11sd = (X11SurfaceData)dst;
        // use false for needExposures since we clip to the pixmap
        long xgc = x11sd.getBlitGC(clip, false);
        nativeBlitBg(src.getNativeOps(), dst.getNativeOps(),
                     xgc, pixel,
                     sx, sy, dx, dy, w, h);
    } finally {
        SunToolkit.awtUnlock();
    }
}
 
Example #3
Source File: X11PMBlitBgLoops.java    From jdk8u-jdk with GNU General Public License v2.0 6 votes vote down vote up
@Override
public void BlitBg(SurfaceData src, SurfaceData dst,
                   Composite comp, Region clip, int bgColor,
                   int sx, int sy,
                   int dx, int dy,
                   int w, int h)
{
    SunToolkit.awtLock();
    try {
        int pixel = dst.pixelFor(bgColor);
        X11SurfaceData x11sd = (X11SurfaceData)dst;
        // use false for needExposures since we clip to the pixmap
        long xgc = x11sd.getBlitGC(clip, false);
        nativeBlitBg(src.getNativeOps(), dst.getNativeOps(),
                     xgc, pixel,
                     sx, sy, dx, dy, w, h);
    } finally {
        SunToolkit.awtUnlock();
    }
}
 
Example #4
Source File: X11PMBlitBgLoops.java    From jdk8u_jdk with GNU General Public License v2.0 6 votes vote down vote up
@Override
public void BlitBg(SurfaceData src, SurfaceData dst,
                   Composite comp, Region clip, int bgColor,
                   int sx, int sy,
                   int dx, int dy,
                   int w, int h)
{
    SunToolkit.awtLock();
    try {
        int pixel = dst.pixelFor(bgColor);
        X11SurfaceData x11sd = (X11SurfaceData)dst;
        // use false for needExposures since we clip to the pixmap
        long xgc = x11sd.getBlitGC(clip, false);
        nativeBlitBg(src.getNativeOps(), dst.getNativeOps(),
                     xgc, pixel,
                     sx, sy, dx, dy, w, h);
    } finally {
        SunToolkit.awtUnlock();
    }
}
 
Example #5
Source File: X11PMBlitBgLoops.java    From openjdk-8 with GNU General Public License v2.0 6 votes vote down vote up
@Override
public void BlitBg(SurfaceData src, SurfaceData dst,
                   Composite comp, Region clip, int bgColor,
                   int sx, int sy,
                   int dx, int dy,
                   int w, int h)
{
    SunToolkit.awtLock();
    try {
        int pixel = dst.pixelFor(bgColor);
        X11SurfaceData x11sd = (X11SurfaceData)dst;
        // use false for needExposures since we clip to the pixmap
        long xgc = x11sd.getBlitGC(clip, false);
        nativeBlitBg(src.getNativeOps(), dst.getNativeOps(),
                     xgc, pixel,
                     sx, sy, dx, dy, w, h);
    } finally {
        SunToolkit.awtUnlock();
    }
}
 
Example #6
Source File: X11PMBlitBgLoops.java    From openjdk-8-source with GNU General Public License v2.0 6 votes vote down vote up
@Override
public void BlitBg(SurfaceData src, SurfaceData dst,
                   Composite comp, Region clip, int bgColor,
                   int sx, int sy,
                   int dx, int dy,
                   int w, int h)
{
    SunToolkit.awtLock();
    try {
        int pixel = dst.pixelFor(bgColor);
        X11SurfaceData x11sd = (X11SurfaceData)dst;
        // use false for needExposures since we clip to the pixmap
        long xgc = x11sd.getBlitGC(clip, false);
        nativeBlitBg(src.getNativeOps(), dst.getNativeOps(),
                     xgc, pixel,
                     sx, sy, dx, dy, w, h);
    } finally {
        SunToolkit.awtUnlock();
    }
}
 
Example #7
Source File: X11PMBlitBgLoops.java    From hottub with GNU General Public License v2.0 6 votes vote down vote up
@Override
public void BlitBg(SurfaceData src, SurfaceData dst,
                   Composite comp, Region clip, int bgColor,
                   int sx, int sy,
                   int dx, int dy,
                   int w, int h)
{
    SunToolkit.awtLock();
    try {
        int pixel = dst.pixelFor(bgColor);
        X11SurfaceData x11sd = (X11SurfaceData)dst;
        // use false for needExposures since we clip to the pixmap
        long xgc = x11sd.getBlitGC(clip, false);
        nativeBlitBg(src.getNativeOps(), dst.getNativeOps(),
                     xgc, pixel,
                     sx, sy, dx, dy, w, h);
    } finally {
        SunToolkit.awtUnlock();
    }
}
 
Example #8
Source File: X11PMBlitBgLoops.java    From jdk8u-jdk with GNU General Public License v2.0 6 votes vote down vote up
@Override
public void BlitBg(SurfaceData src, SurfaceData dst,
                   Composite comp, Region clip, int bgColor,
                   int sx, int sy,
                   int dx, int dy,
                   int w, int h)
{
    SunToolkit.awtLock();
    try {
        int pixel = dst.pixelFor(bgColor);
        X11SurfaceData x11sd = (X11SurfaceData)dst;
        // use false for needExposures since we clip to the pixmap
        long xgc = x11sd.getBlitGC(clip, false);
        nativeBlitBg(src.getNativeOps(), dst.getNativeOps(),
                     xgc, pixel,
                     sx, sy, dx, dy, w, h);
    } finally {
        SunToolkit.awtUnlock();
    }
}
 
Example #9
Source File: X11PMBlitBgLoops.java    From openjdk-jdk9 with GNU General Public License v2.0 6 votes vote down vote up
@Override
public void BlitBg(SurfaceData src, SurfaceData dst,
                   Composite comp, Region clip, int bgColor,
                   int sx, int sy,
                   int dx, int dy,
                   int w, int h)
{
    SunToolkit.awtLock();
    try {
        int pixel = dst.pixelFor(bgColor);
        X11SurfaceData x11sd = (X11SurfaceData)dst;
        // use false for needExposures since we clip to the pixmap
        long xgc = x11sd.getBlitGC(clip, false);
        nativeBlitBg(src.getNativeOps(), dst.getNativeOps(),
                     xgc, pixel,
                     sx, sy, dx, dy, w, h);
    } finally {
        SunToolkit.awtUnlock();
    }
}
 
Example #10
Source File: X11PMBlitBgLoops.java    From openjdk-jdk8u-backup with GNU General Public License v2.0 6 votes vote down vote up
@Override
public void BlitBg(SurfaceData src, SurfaceData dst,
                   Composite comp, Region clip, int bgColor,
                   int sx, int sy,
                   int dx, int dy,
                   int w, int h)
{
    SunToolkit.awtLock();
    try {
        int pixel = dst.pixelFor(bgColor);
        X11SurfaceData x11sd = (X11SurfaceData)dst;
        // use false for needExposures since we clip to the pixmap
        long xgc = x11sd.getBlitGC(clip, false);
        nativeBlitBg(src.getNativeOps(), dst.getNativeOps(),
                     xgc, pixel,
                     sx, sy, dx, dy, w, h);
    } finally {
        SunToolkit.awtUnlock();
    }
}
 
Example #11
Source File: X11PMBlitBgLoops.java    From openjdk-jdk8u with GNU General Public License v2.0 6 votes vote down vote up
@Override
public void BlitBg(SurfaceData src, SurfaceData dst,
                   Composite comp, Region clip, int bgColor,
                   int sx, int sy,
                   int dx, int dy,
                   int w, int h)
{
    SunToolkit.awtLock();
    try {
        int pixel = dst.pixelFor(bgColor);
        X11SurfaceData x11sd = (X11SurfaceData)dst;
        // use false for needExposures since we clip to the pixmap
        long xgc = x11sd.getBlitGC(clip, false);
        nativeBlitBg(src.getNativeOps(), dst.getNativeOps(),
                     xgc, pixel,
                     sx, sy, dx, dy, w, h);
    } finally {
        SunToolkit.awtUnlock();
    }
}
 
Example #12
Source File: X11PMBlitBgLoops.java    From TencentKona-8 with GNU General Public License v2.0 6 votes vote down vote up
@Override
public void BlitBg(SurfaceData src, SurfaceData dst,
                   Composite comp, Region clip, int bgColor,
                   int sx, int sy,
                   int dx, int dy,
                   int w, int h)
{
    SunToolkit.awtLock();
    try {
        int pixel = dst.pixelFor(bgColor);
        X11SurfaceData x11sd = (X11SurfaceData)dst;
        // use false for needExposures since we clip to the pixmap
        long xgc = x11sd.getBlitGC(clip, false);
        nativeBlitBg(src.getNativeOps(), dst.getNativeOps(),
                     xgc, pixel,
                     sx, sy, dx, dy, w, h);
    } finally {
        SunToolkit.awtUnlock();
    }
}
 
Example #13
Source File: X11PMBlitBgLoops.java    From jdk8u60 with GNU General Public License v2.0 6 votes vote down vote up
@Override
public void BlitBg(SurfaceData src, SurfaceData dst,
                   Composite comp, Region clip, int bgColor,
                   int sx, int sy,
                   int dx, int dy,
                   int w, int h)
{
    SunToolkit.awtLock();
    try {
        int pixel = dst.pixelFor(bgColor);
        X11SurfaceData x11sd = (X11SurfaceData)dst;
        // use false for needExposures since we clip to the pixmap
        long xgc = x11sd.getBlitGC(clip, false);
        nativeBlitBg(src.getNativeOps(), dst.getNativeOps(),
                     xgc, pixel,
                     sx, sy, dx, dy, w, h);
    } finally {
        SunToolkit.awtUnlock();
    }
}
 
Example #14
Source File: SurfaceDataProxy.java    From dragonwell8_jdk with GNU General Public License v2.0 5 votes vote down vote up
/**
 * 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();
}
 
Example #15
Source File: SurfaceDataProxy.java    From jdk8u-dev-jdk with GNU General Public License v2.0 5 votes vote down vote up
/**
 * 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();
}
 
Example #16
Source File: SurfaceDataProxy.java    From TencentKona-8 with GNU General Public License v2.0 5 votes vote down vote up
/**
 * 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();
}
 
Example #17
Source File: SurfaceDataProxy.java    From jdk8u-jdk with GNU General Public License v2.0 5 votes vote down vote up
/**
 * 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();
}
 
Example #18
Source File: SurfaceDataProxy.java    From jdk8u_jdk with GNU General Public License v2.0 5 votes vote down vote up
/**
 * 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();
}
 
Example #19
Source File: SurfaceDataProxy.java    From jdk8u60 with GNU General Public License v2.0 5 votes vote down vote up
/**
 * 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();
}
 
Example #20
Source File: SurfaceDataProxy.java    From openjdk-8 with GNU General Public License v2.0 5 votes vote down vote up
/**
 * 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();
}
 
Example #21
Source File: SurfaceDataProxy.java    From openjdk-8-source with GNU General Public License v2.0 5 votes vote down vote up
/**
 * 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();
}
 
Example #22
Source File: SurfaceDataProxy.java    From openjdk-jdk8u with GNU General Public License v2.0 5 votes vote down vote up
/**
 * 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();
}
 
Example #23
Source File: SurfaceDataProxy.java    From hottub with GNU General Public License v2.0 5 votes vote down vote up
/**
 * 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();
}
 
Example #24
Source File: SurfaceDataProxy.java    From jdk8u-jdk with GNU General Public License v2.0 5 votes vote down vote up
/**
 * 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();
}
 
Example #25
Source File: SurfaceDataProxy.java    From openjdk-jdk8u-backup with GNU General Public License v2.0 5 votes vote down vote up
/**
 * 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();
}
 
Example #26
Source File: SurfaceDataProxy.java    From openjdk-jdk9 with GNU General Public License v2.0 5 votes vote down vote up
/**
 * 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();
}
 
Example #27
Source File: SurfaceDataProxy.java    From Bytecoder with Apache License 2.0 5 votes vote down vote up
/**
 * 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();
}