java.awt.Color#getTransparency ( )源码实例Demo

下面列出了java.awt.Color#getTransparency ( ) 实例代码,或者点击链接到github查看源代码,也可以在右侧发表评论。

源代码1 项目: dragonwell8_jdk   文件: X11SurfaceDataProxy.java
@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;
}
 
源代码2 项目: TencentKona-8   文件: X11SurfaceDataProxy.java
@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;
}
 
源代码3 项目: jdk8u60   文件: X11SurfaceDataProxy.java
@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;
}
 
源代码4 项目: openjdk-jdk8u   文件: X11SurfaceDataProxy.java
@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;
}
 
@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;
}
 
源代码6 项目: openjdk-jdk9   文件: X11SurfaceDataProxy.java
@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;
}
 
源代码7 项目: jdk8u-jdk   文件: X11SurfaceDataProxy.java
@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;
}
 
源代码8 项目: hottub   文件: X11SurfaceDataProxy.java
@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;
}
 
源代码9 项目: openjdk-8-source   文件: X11SurfaceDataProxy.java
@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;
}
 
源代码10 项目: openjdk-8   文件: X11SurfaceDataProxy.java
@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;
}
 
源代码11 项目: jdk8u_jdk   文件: X11SurfaceDataProxy.java
@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;
}
 
源代码12 项目: jdk8u-jdk   文件: X11SurfaceDataProxy.java
@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;
}
 
源代码13 项目: jdk8u-dev-jdk   文件: X11SurfaceDataProxy.java
@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;
}