Java Code Examples for java.awt.Color#getTransparency()

The following examples show how to use java.awt.Color#getTransparency() . These examples are extracted from open source projects. 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
@Override
public boolean isSupportedOperation(SurfaceData srcData,
                                    int txtype,
                                    CompositeType comp,
                                    Color bgColor)
{
    // These could probably be combined into a single
    // nested if, but the logic is easier to follow this way.

    // we don't have X11 scale loops, so always use
    // software surface in case of scaling
    if (txtype >= SunGraphics2D.TRANSFORM_TRANSLATESCALE) {
        return false;
    }

    if (bgColor != null &&
        bgColor.getTransparency() != Transparency.OPAQUE)
    {
        return false;
    }

    // for transparent images SrcNoEa+bgColor has the
    // same effect as SrcOverNoEa+bgColor, so we allow
    // copying from pixmap SD using accelerated blitbg loops:
    // SrcOver will be changed to SrcNoEa in DrawImage.blitSD
    if (CompositeType.SrcOverNoEa.equals(comp) ||
        (CompositeType.SrcNoEa.equals(comp) &&
         bgColor != null))
    {
        return true;
    }

    return false;
}
 
Example 2
@Override
public boolean isSupportedOperation(SurfaceData srcData,
                                    int txtype,
                                    CompositeType comp,
                                    Color bgColor)
{
    // These could probably be combined into a single
    // nested if, but the logic is easier to follow this way.

    // we don't have X11 scale loops, so always use
    // software surface in case of scaling
    if (txtype >= SunGraphics2D.TRANSFORM_TRANSLATESCALE) {
        return false;
    }

    if (bgColor != null &&
        bgColor.getTransparency() != Transparency.OPAQUE)
    {
        return false;
    }

    // for transparent images SrcNoEa+bgColor has the
    // same effect as SrcOverNoEa+bgColor, so we allow
    // copying from pixmap SD using accelerated blitbg loops:
    // SrcOver will be changed to SrcNoEa in DrawImage.blitSD
    if (CompositeType.SrcOverNoEa.equals(comp) ||
        (CompositeType.SrcNoEa.equals(comp) &&
         bgColor != null))
    {
        return true;
    }

    return false;
}
 
Example 3
@Override
public boolean isSupportedOperation(SurfaceData srcData,
                                    int txtype,
                                    CompositeType comp,
                                    Color bgColor)
{
    // These could probably be combined into a single
    // nested if, but the logic is easier to follow this way.

    // we don't have X11 scale loops, so always use
    // software surface in case of scaling
    if (txtype >= SunGraphics2D.TRANSFORM_TRANSLATESCALE) {
        return false;
    }

    if (bgColor != null &&
        bgColor.getTransparency() != Transparency.OPAQUE)
    {
        return false;
    }

    // for transparent images SrcNoEa+bgColor has the
    // same effect as SrcOverNoEa+bgColor, so we allow
    // copying from pixmap SD using accelerated blitbg loops:
    // SrcOver will be changed to SrcNoEa in DrawImage.blitSD
    if (CompositeType.SrcOverNoEa.equals(comp) ||
        (CompositeType.SrcNoEa.equals(comp) &&
         bgColor != null))
    {
        return true;
    }

    return false;
}
 
Example 4
@Override
public boolean isSupportedOperation(SurfaceData srcData,
                                    int txtype,
                                    CompositeType comp,
                                    Color bgColor)
{
    // These could probably be combined into a single
    // nested if, but the logic is easier to follow this way.

    // we don't have X11 scale loops, so always use
    // software surface in case of scaling
    if (txtype >= SunGraphics2D.TRANSFORM_TRANSLATESCALE) {
        return false;
    }

    if (bgColor != null &&
        bgColor.getTransparency() != Transparency.OPAQUE)
    {
        return false;
    }

    // for transparent images SrcNoEa+bgColor has the
    // same effect as SrcOverNoEa+bgColor, so we allow
    // copying from pixmap SD using accelerated blitbg loops:
    // SrcOver will be changed to SrcNoEa in DrawImage.blitSD
    if (CompositeType.SrcOverNoEa.equals(comp) ||
        (CompositeType.SrcNoEa.equals(comp) &&
         bgColor != null))
    {
        return true;
    }

    return false;
}
 
Example 5
@Override
public boolean isSupportedOperation(SurfaceData srcData,
                                    int txtype,
                                    CompositeType comp,
                                    Color bgColor)
{
    // These could probably be combined into a single
    // nested if, but the logic is easier to follow this way.

    // we don't have X11 scale loops, so always use
    // software surface in case of scaling
    if (txtype >= SunGraphics2D.TRANSFORM_TRANSLATESCALE) {
        return false;
    }

    if (bgColor != null &&
        bgColor.getTransparency() != Transparency.OPAQUE)
    {
        return false;
    }

    // for transparent images SrcNoEa+bgColor has the
    // same effect as SrcOverNoEa+bgColor, so we allow
    // copying from pixmap SD using accelerated blitbg loops:
    // SrcOver will be changed to SrcNoEa in DrawImage.blitSD
    if (CompositeType.SrcOverNoEa.equals(comp) ||
        (CompositeType.SrcNoEa.equals(comp) &&
         bgColor != null))
    {
        return true;
    }

    return false;
}
 
Example 6
@Override
public boolean isSupportedOperation(SurfaceData srcData,
                                    int txtype,
                                    CompositeType comp,
                                    Color bgColor)
{
    // These could probably be combined into a single
    // nested if, but the logic is easier to follow this way.

    // we don't have X11 scale loops, so always use
    // software surface in case of scaling
    if (txtype >= SunGraphics2D.TRANSFORM_TRANSLATESCALE) {
        return false;
    }

    if (bgColor != null &&
        bgColor.getTransparency() != Transparency.OPAQUE)
    {
        return false;
    }

    // for transparent images SrcNoEa+bgColor has the
    // same effect as SrcOverNoEa+bgColor, so we allow
    // copying from pixmap SD using accelerated blitbg loops:
    // SrcOver will be changed to SrcNoEa in DrawImage.blitSD
    if (CompositeType.SrcOverNoEa.equals(comp) ||
        (CompositeType.SrcNoEa.equals(comp) &&
         bgColor != null))
    {
        return true;
    }

    return false;
}
 
Example 7
@Override
public boolean isSupportedOperation(SurfaceData srcData,
                                    int txtype,
                                    CompositeType comp,
                                    Color bgColor)
{
    // These could probably be combined into a single
    // nested if, but the logic is easier to follow this way.

    // we don't have X11 scale loops, so always use
    // software surface in case of scaling
    if (txtype >= SunGraphics2D.TRANSFORM_TRANSLATESCALE) {
        return false;
    }

    if (bgColor != null &&
        bgColor.getTransparency() != Transparency.OPAQUE)
    {
        return false;
    }

    // for transparent images SrcNoEa+bgColor has the
    // same effect as SrcOverNoEa+bgColor, so we allow
    // copying from pixmap SD using accelerated blitbg loops:
    // SrcOver will be changed to SrcNoEa in DrawImage.blitSD
    if (CompositeType.SrcOverNoEa.equals(comp) ||
        (CompositeType.SrcNoEa.equals(comp) &&
         bgColor != null))
    {
        return true;
    }

    return false;
}
 
Example 8
@Override
public boolean isSupportedOperation(SurfaceData srcData,
                                    int txtype,
                                    CompositeType comp,
                                    Color bgColor)
{
    // These could probably be combined into a single
    // nested if, but the logic is easier to follow this way.

    // we don't have X11 scale loops, so always use
    // software surface in case of scaling
    if (txtype >= SunGraphics2D.TRANSFORM_TRANSLATESCALE) {
        return false;
    }

    if (bgColor != null &&
        bgColor.getTransparency() != Transparency.OPAQUE)
    {
        return false;
    }

    // for transparent images SrcNoEa+bgColor has the
    // same effect as SrcOverNoEa+bgColor, so we allow
    // copying from pixmap SD using accelerated blitbg loops:
    // SrcOver will be changed to SrcNoEa in DrawImage.blitSD
    if (CompositeType.SrcOverNoEa.equals(comp) ||
        (CompositeType.SrcNoEa.equals(comp) &&
         bgColor != null))
    {
        return true;
    }

    return false;
}
 
Example 9
@Override
public boolean isSupportedOperation(SurfaceData srcData,
                                    int txtype,
                                    CompositeType comp,
                                    Color bgColor)
{
    // These could probably be combined into a single
    // nested if, but the logic is easier to follow this way.

    // we don't have X11 scale loops, so always use
    // software surface in case of scaling
    if (txtype >= SunGraphics2D.TRANSFORM_TRANSLATESCALE) {
        return false;
    }

    if (bgColor != null &&
        bgColor.getTransparency() != Transparency.OPAQUE)
    {
        return false;
    }

    // for transparent images SrcNoEa+bgColor has the
    // same effect as SrcOverNoEa+bgColor, so we allow
    // copying from pixmap SD using accelerated blitbg loops:
    // SrcOver will be changed to SrcNoEa in DrawImage.blitSD
    if (CompositeType.SrcOverNoEa.equals(comp) ||
        (CompositeType.SrcNoEa.equals(comp) &&
         bgColor != null))
    {
        return true;
    }

    return false;
}
 
Example 10
@Override
public boolean isSupportedOperation(SurfaceData srcData,
                                    int txtype,
                                    CompositeType comp,
                                    Color bgColor)
{
    // These could probably be combined into a single
    // nested if, but the logic is easier to follow this way.

    // we don't have X11 scale loops, so always use
    // software surface in case of scaling
    if (txtype >= SunGraphics2D.TRANSFORM_TRANSLATESCALE) {
        return false;
    }

    if (bgColor != null &&
        bgColor.getTransparency() != Transparency.OPAQUE)
    {
        return false;
    }

    // for transparent images SrcNoEa+bgColor has the
    // same effect as SrcOverNoEa+bgColor, so we allow
    // copying from pixmap SD using accelerated blitbg loops:
    // SrcOver will be changed to SrcNoEa in DrawImage.blitSD
    if (CompositeType.SrcOverNoEa.equals(comp) ||
        (CompositeType.SrcNoEa.equals(comp) &&
         bgColor != null))
    {
        return true;
    }

    return false;
}
 
Example 11
@Override
public boolean isSupportedOperation(SurfaceData srcData,
                                    int txtype,
                                    CompositeType comp,
                                    Color bgColor)
{
    // These could probably be combined into a single
    // nested if, but the logic is easier to follow this way.

    // we don't have X11 scale loops, so always use
    // software surface in case of scaling
    if (txtype >= SunGraphics2D.TRANSFORM_TRANSLATESCALE) {
        return false;
    }

    if (bgColor != null &&
        bgColor.getTransparency() != Transparency.OPAQUE)
    {
        return false;
    }

    // for transparent images SrcNoEa+bgColor has the
    // same effect as SrcOverNoEa+bgColor, so we allow
    // copying from pixmap SD using accelerated blitbg loops:
    // SrcOver will be changed to SrcNoEa in DrawImage.blitSD
    if (CompositeType.SrcOverNoEa.equals(comp) ||
        (CompositeType.SrcNoEa.equals(comp) &&
         bgColor != null))
    {
        return true;
    }

    return false;
}
 
Example 12
@Override
public boolean isSupportedOperation(SurfaceData srcData,
                                    int txtype,
                                    CompositeType comp,
                                    Color bgColor)
{
    // These could probably be combined into a single
    // nested if, but the logic is easier to follow this way.

    // we don't have X11 scale loops, so always use
    // software surface in case of scaling
    if (txtype >= SunGraphics2D.TRANSFORM_TRANSLATESCALE) {
        return false;
    }

    if (bgColor != null &&
        bgColor.getTransparency() != Transparency.OPAQUE)
    {
        return false;
    }

    // for transparent images SrcNoEa+bgColor has the
    // same effect as SrcOverNoEa+bgColor, so we allow
    // copying from pixmap SD using accelerated blitbg loops:
    // SrcOver will be changed to SrcNoEa in DrawImage.blitSD
    if (CompositeType.SrcOverNoEa.equals(comp) ||
        (CompositeType.SrcNoEa.equals(comp) &&
         bgColor != null))
    {
        return true;
    }

    return false;
}
 
Example 13
@Override
public boolean isSupportedOperation(SurfaceData srcData,
                                    int txtype,
                                    CompositeType comp,
                                    Color bgColor)
{
    // These could probably be combined into a single
    // nested if, but the logic is easier to follow this way.

    // we don't have X11 scale loops, so always use
    // software surface in case of scaling
    if (txtype >= SunGraphics2D.TRANSFORM_TRANSLATESCALE) {
        return false;
    }

    if (bgColor != null &&
        bgColor.getTransparency() != Transparency.OPAQUE)
    {
        return false;
    }

    // for transparent images SrcNoEa+bgColor has the
    // same effect as SrcOverNoEa+bgColor, so we allow
    // copying from pixmap SD using accelerated blitbg loops:
    // SrcOver will be changed to SrcNoEa in DrawImage.blitSD
    if (CompositeType.SrcOverNoEa.equals(comp) ||
        (CompositeType.SrcNoEa.equals(comp) &&
         bgColor != null))
    {
        return true;
    }

    return false;
}