Java Code Examples for java.awt.AlphaComposite#SRC_OUT

The following examples show how to use java.awt.AlphaComposite#SRC_OUT . 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: CompositeType.java    From dragonwell8_jdk with GNU General Public License v2.0 5 votes vote down vote up
/**
 * Return a CompositeType object for the specified AlphaComposite
 * rule.
 */
public static CompositeType forAlphaComposite(AlphaComposite ac) {
    switch (ac.getRule()) {
    case AlphaComposite.CLEAR:
        return Clear;
    case AlphaComposite.SRC:
        if (ac.getAlpha() >= 1.0f) {
            return SrcNoEa;
        } else {
            return Src;
        }
    case AlphaComposite.DST:
        return Dst;
    case AlphaComposite.SRC_OVER:
        if (ac.getAlpha() >= 1.0f) {
            return SrcOverNoEa;
        } else {
            return SrcOver;
        }
    case AlphaComposite.DST_OVER:
        return DstOver;
    case AlphaComposite.SRC_IN:
        return SrcIn;
    case AlphaComposite.DST_IN:
        return DstIn;
    case AlphaComposite.SRC_OUT:
        return SrcOut;
    case AlphaComposite.DST_OUT:
        return DstOut;
    case AlphaComposite.SRC_ATOP:
        return SrcAtop;
    case AlphaComposite.DST_ATOP:
        return DstAtop;
    case AlphaComposite.XOR:
        return AlphaXor;
    default:
        throw new InternalError("Unrecognized alpha rule");
    }
}
 
Example 2
Source File: CompositeType.java    From TencentKona-8 with GNU General Public License v2.0 5 votes vote down vote up
/**
 * Return a CompositeType object for the specified AlphaComposite
 * rule.
 */
public static CompositeType forAlphaComposite(AlphaComposite ac) {
    switch (ac.getRule()) {
    case AlphaComposite.CLEAR:
        return Clear;
    case AlphaComposite.SRC:
        if (ac.getAlpha() >= 1.0f) {
            return SrcNoEa;
        } else {
            return Src;
        }
    case AlphaComposite.DST:
        return Dst;
    case AlphaComposite.SRC_OVER:
        if (ac.getAlpha() >= 1.0f) {
            return SrcOverNoEa;
        } else {
            return SrcOver;
        }
    case AlphaComposite.DST_OVER:
        return DstOver;
    case AlphaComposite.SRC_IN:
        return SrcIn;
    case AlphaComposite.DST_IN:
        return DstIn;
    case AlphaComposite.SRC_OUT:
        return SrcOut;
    case AlphaComposite.DST_OUT:
        return DstOut;
    case AlphaComposite.SRC_ATOP:
        return SrcAtop;
    case AlphaComposite.DST_ATOP:
        return DstAtop;
    case AlphaComposite.XOR:
        return AlphaXor;
    default:
        throw new InternalError("Unrecognized alpha rule");
    }
}
 
Example 3
Source File: CompositeType.java    From jdk8u60 with GNU General Public License v2.0 5 votes vote down vote up
/**
 * Return a CompositeType object for the specified AlphaComposite
 * rule.
 */
public static CompositeType forAlphaComposite(AlphaComposite ac) {
    switch (ac.getRule()) {
    case AlphaComposite.CLEAR:
        return Clear;
    case AlphaComposite.SRC:
        if (ac.getAlpha() >= 1.0f) {
            return SrcNoEa;
        } else {
            return Src;
        }
    case AlphaComposite.DST:
        return Dst;
    case AlphaComposite.SRC_OVER:
        if (ac.getAlpha() >= 1.0f) {
            return SrcOverNoEa;
        } else {
            return SrcOver;
        }
    case AlphaComposite.DST_OVER:
        return DstOver;
    case AlphaComposite.SRC_IN:
        return SrcIn;
    case AlphaComposite.DST_IN:
        return DstIn;
    case AlphaComposite.SRC_OUT:
        return SrcOut;
    case AlphaComposite.DST_OUT:
        return DstOut;
    case AlphaComposite.SRC_ATOP:
        return SrcAtop;
    case AlphaComposite.DST_ATOP:
        return DstAtop;
    case AlphaComposite.XOR:
        return AlphaXor;
    default:
        throw new InternalError("Unrecognized alpha rule");
    }
}
 
Example 4
Source File: CompositeType.java    From openjdk-jdk8u with GNU General Public License v2.0 5 votes vote down vote up
/**
 * Return a CompositeType object for the specified AlphaComposite
 * rule.
 */
public static CompositeType forAlphaComposite(AlphaComposite ac) {
    switch (ac.getRule()) {
    case AlphaComposite.CLEAR:
        return Clear;
    case AlphaComposite.SRC:
        if (ac.getAlpha() >= 1.0f) {
            return SrcNoEa;
        } else {
            return Src;
        }
    case AlphaComposite.DST:
        return Dst;
    case AlphaComposite.SRC_OVER:
        if (ac.getAlpha() >= 1.0f) {
            return SrcOverNoEa;
        } else {
            return SrcOver;
        }
    case AlphaComposite.DST_OVER:
        return DstOver;
    case AlphaComposite.SRC_IN:
        return SrcIn;
    case AlphaComposite.DST_IN:
        return DstIn;
    case AlphaComposite.SRC_OUT:
        return SrcOut;
    case AlphaComposite.DST_OUT:
        return DstOut;
    case AlphaComposite.SRC_ATOP:
        return SrcAtop;
    case AlphaComposite.DST_ATOP:
        return DstAtop;
    case AlphaComposite.XOR:
        return AlphaXor;
    default:
        throw new InternalError("Unrecognized alpha rule");
    }
}
 
Example 5
Source File: CompositeType.java    From openjdk-jdk8u-backup with GNU General Public License v2.0 5 votes vote down vote up
/**
 * Return a CompositeType object for the specified AlphaComposite
 * rule.
 */
public static CompositeType forAlphaComposite(AlphaComposite ac) {
    switch (ac.getRule()) {
    case AlphaComposite.CLEAR:
        return Clear;
    case AlphaComposite.SRC:
        if (ac.getAlpha() >= 1.0f) {
            return SrcNoEa;
        } else {
            return Src;
        }
    case AlphaComposite.DST:
        return Dst;
    case AlphaComposite.SRC_OVER:
        if (ac.getAlpha() >= 1.0f) {
            return SrcOverNoEa;
        } else {
            return SrcOver;
        }
    case AlphaComposite.DST_OVER:
        return DstOver;
    case AlphaComposite.SRC_IN:
        return SrcIn;
    case AlphaComposite.DST_IN:
        return DstIn;
    case AlphaComposite.SRC_OUT:
        return SrcOut;
    case AlphaComposite.DST_OUT:
        return DstOut;
    case AlphaComposite.SRC_ATOP:
        return SrcAtop;
    case AlphaComposite.DST_ATOP:
        return DstAtop;
    case AlphaComposite.XOR:
        return AlphaXor;
    default:
        throw new InternalError("Unrecognized alpha rule");
    }
}
 
Example 6
Source File: CompositeType.java    From Bytecoder with Apache License 2.0 5 votes vote down vote up
/**
 * Return a CompositeType object for the specified AlphaComposite
 * rule.
 */
public static CompositeType forAlphaComposite(AlphaComposite ac) {
    switch (ac.getRule()) {
    case AlphaComposite.CLEAR:
        return Clear;
    case AlphaComposite.SRC:
        if (ac.getAlpha() >= 1.0f) {
            return SrcNoEa;
        } else {
            return Src;
        }
    case AlphaComposite.DST:
        return Dst;
    case AlphaComposite.SRC_OVER:
        if (ac.getAlpha() >= 1.0f) {
            return SrcOverNoEa;
        } else {
            return SrcOver;
        }
    case AlphaComposite.DST_OVER:
        return DstOver;
    case AlphaComposite.SRC_IN:
        return SrcIn;
    case AlphaComposite.DST_IN:
        return DstIn;
    case AlphaComposite.SRC_OUT:
        return SrcOut;
    case AlphaComposite.DST_OUT:
        return DstOut;
    case AlphaComposite.SRC_ATOP:
        return SrcAtop;
    case AlphaComposite.DST_ATOP:
        return DstAtop;
    case AlphaComposite.XOR:
        return AlphaXor;
    default:
        throw new InternalError("Unrecognized alpha rule");
    }
}
 
Example 7
Source File: CompositeType.java    From openjdk-jdk9 with GNU General Public License v2.0 5 votes vote down vote up
/**
 * Return a CompositeType object for the specified AlphaComposite
 * rule.
 */
public static CompositeType forAlphaComposite(AlphaComposite ac) {
    switch (ac.getRule()) {
    case AlphaComposite.CLEAR:
        return Clear;
    case AlphaComposite.SRC:
        if (ac.getAlpha() >= 1.0f) {
            return SrcNoEa;
        } else {
            return Src;
        }
    case AlphaComposite.DST:
        return Dst;
    case AlphaComposite.SRC_OVER:
        if (ac.getAlpha() >= 1.0f) {
            return SrcOverNoEa;
        } else {
            return SrcOver;
        }
    case AlphaComposite.DST_OVER:
        return DstOver;
    case AlphaComposite.SRC_IN:
        return SrcIn;
    case AlphaComposite.DST_IN:
        return DstIn;
    case AlphaComposite.SRC_OUT:
        return SrcOut;
    case AlphaComposite.DST_OUT:
        return DstOut;
    case AlphaComposite.SRC_ATOP:
        return SrcAtop;
    case AlphaComposite.DST_ATOP:
        return DstAtop;
    case AlphaComposite.XOR:
        return AlphaXor;
    default:
        throw new InternalError("Unrecognized alpha rule");
    }
}
 
Example 8
Source File: CompositeType.java    From jdk8u-jdk with GNU General Public License v2.0 5 votes vote down vote up
/**
 * Return a CompositeType object for the specified AlphaComposite
 * rule.
 */
public static CompositeType forAlphaComposite(AlphaComposite ac) {
    switch (ac.getRule()) {
    case AlphaComposite.CLEAR:
        return Clear;
    case AlphaComposite.SRC:
        if (ac.getAlpha() >= 1.0f) {
            return SrcNoEa;
        } else {
            return Src;
        }
    case AlphaComposite.DST:
        return Dst;
    case AlphaComposite.SRC_OVER:
        if (ac.getAlpha() >= 1.0f) {
            return SrcOverNoEa;
        } else {
            return SrcOver;
        }
    case AlphaComposite.DST_OVER:
        return DstOver;
    case AlphaComposite.SRC_IN:
        return SrcIn;
    case AlphaComposite.DST_IN:
        return DstIn;
    case AlphaComposite.SRC_OUT:
        return SrcOut;
    case AlphaComposite.DST_OUT:
        return DstOut;
    case AlphaComposite.SRC_ATOP:
        return SrcAtop;
    case AlphaComposite.DST_ATOP:
        return DstAtop;
    case AlphaComposite.XOR:
        return AlphaXor;
    default:
        throw new InternalError("Unrecognized alpha rule");
    }
}
 
Example 9
Source File: CompositeType.java    From hottub with GNU General Public License v2.0 5 votes vote down vote up
/**
 * Return a CompositeType object for the specified AlphaComposite
 * rule.
 */
public static CompositeType forAlphaComposite(AlphaComposite ac) {
    switch (ac.getRule()) {
    case AlphaComposite.CLEAR:
        return Clear;
    case AlphaComposite.SRC:
        if (ac.getAlpha() >= 1.0f) {
            return SrcNoEa;
        } else {
            return Src;
        }
    case AlphaComposite.DST:
        return Dst;
    case AlphaComposite.SRC_OVER:
        if (ac.getAlpha() >= 1.0f) {
            return SrcOverNoEa;
        } else {
            return SrcOver;
        }
    case AlphaComposite.DST_OVER:
        return DstOver;
    case AlphaComposite.SRC_IN:
        return SrcIn;
    case AlphaComposite.DST_IN:
        return DstIn;
    case AlphaComposite.SRC_OUT:
        return SrcOut;
    case AlphaComposite.DST_OUT:
        return DstOut;
    case AlphaComposite.SRC_ATOP:
        return SrcAtop;
    case AlphaComposite.DST_ATOP:
        return DstAtop;
    case AlphaComposite.XOR:
        return AlphaXor;
    default:
        throw new InternalError("Unrecognized alpha rule");
    }
}
 
Example 10
Source File: CompositeType.java    From openjdk-8-source with GNU General Public License v2.0 5 votes vote down vote up
/**
 * Return a CompositeType object for the specified AlphaComposite
 * rule.
 */
public static CompositeType forAlphaComposite(AlphaComposite ac) {
    switch (ac.getRule()) {
    case AlphaComposite.CLEAR:
        return Clear;
    case AlphaComposite.SRC:
        if (ac.getAlpha() >= 1.0f) {
            return SrcNoEa;
        } else {
            return Src;
        }
    case AlphaComposite.DST:
        return Dst;
    case AlphaComposite.SRC_OVER:
        if (ac.getAlpha() >= 1.0f) {
            return SrcOverNoEa;
        } else {
            return SrcOver;
        }
    case AlphaComposite.DST_OVER:
        return DstOver;
    case AlphaComposite.SRC_IN:
        return SrcIn;
    case AlphaComposite.DST_IN:
        return DstIn;
    case AlphaComposite.SRC_OUT:
        return SrcOut;
    case AlphaComposite.DST_OUT:
        return DstOut;
    case AlphaComposite.SRC_ATOP:
        return SrcAtop;
    case AlphaComposite.DST_ATOP:
        return DstAtop;
    case AlphaComposite.XOR:
        return AlphaXor;
    default:
        throw new InternalError("Unrecognized alpha rule");
    }
}
 
Example 11
Source File: CompositeType.java    From openjdk-8 with GNU General Public License v2.0 5 votes vote down vote up
/**
 * Return a CompositeType object for the specified AlphaComposite
 * rule.
 */
public static CompositeType forAlphaComposite(AlphaComposite ac) {
    switch (ac.getRule()) {
    case AlphaComposite.CLEAR:
        return Clear;
    case AlphaComposite.SRC:
        if (ac.getAlpha() >= 1.0f) {
            return SrcNoEa;
        } else {
            return Src;
        }
    case AlphaComposite.DST:
        return Dst;
    case AlphaComposite.SRC_OVER:
        if (ac.getAlpha() >= 1.0f) {
            return SrcOverNoEa;
        } else {
            return SrcOver;
        }
    case AlphaComposite.DST_OVER:
        return DstOver;
    case AlphaComposite.SRC_IN:
        return SrcIn;
    case AlphaComposite.DST_IN:
        return DstIn;
    case AlphaComposite.SRC_OUT:
        return SrcOut;
    case AlphaComposite.DST_OUT:
        return DstOut;
    case AlphaComposite.SRC_ATOP:
        return SrcAtop;
    case AlphaComposite.DST_ATOP:
        return DstAtop;
    case AlphaComposite.XOR:
        return AlphaXor;
    default:
        throw new InternalError("Unrecognized alpha rule");
    }
}
 
Example 12
Source File: CompositeType.java    From jdk8u_jdk with GNU General Public License v2.0 5 votes vote down vote up
/**
 * Return a CompositeType object for the specified AlphaComposite
 * rule.
 */
public static CompositeType forAlphaComposite(AlphaComposite ac) {
    switch (ac.getRule()) {
    case AlphaComposite.CLEAR:
        return Clear;
    case AlphaComposite.SRC:
        if (ac.getAlpha() >= 1.0f) {
            return SrcNoEa;
        } else {
            return Src;
        }
    case AlphaComposite.DST:
        return Dst;
    case AlphaComposite.SRC_OVER:
        if (ac.getAlpha() >= 1.0f) {
            return SrcOverNoEa;
        } else {
            return SrcOver;
        }
    case AlphaComposite.DST_OVER:
        return DstOver;
    case AlphaComposite.SRC_IN:
        return SrcIn;
    case AlphaComposite.DST_IN:
        return DstIn;
    case AlphaComposite.SRC_OUT:
        return SrcOut;
    case AlphaComposite.DST_OUT:
        return DstOut;
    case AlphaComposite.SRC_ATOP:
        return SrcAtop;
    case AlphaComposite.DST_ATOP:
        return DstAtop;
    case AlphaComposite.XOR:
        return AlphaXor;
    default:
        throw new InternalError("Unrecognized alpha rule");
    }
}
 
Example 13
Source File: CompositeType.java    From jdk8u-jdk with GNU General Public License v2.0 5 votes vote down vote up
/**
 * Return a CompositeType object for the specified AlphaComposite
 * rule.
 */
public static CompositeType forAlphaComposite(AlphaComposite ac) {
    switch (ac.getRule()) {
    case AlphaComposite.CLEAR:
        return Clear;
    case AlphaComposite.SRC:
        if (ac.getAlpha() >= 1.0f) {
            return SrcNoEa;
        } else {
            return Src;
        }
    case AlphaComposite.DST:
        return Dst;
    case AlphaComposite.SRC_OVER:
        if (ac.getAlpha() >= 1.0f) {
            return SrcOverNoEa;
        } else {
            return SrcOver;
        }
    case AlphaComposite.DST_OVER:
        return DstOver;
    case AlphaComposite.SRC_IN:
        return SrcIn;
    case AlphaComposite.DST_IN:
        return DstIn;
    case AlphaComposite.SRC_OUT:
        return SrcOut;
    case AlphaComposite.DST_OUT:
        return DstOut;
    case AlphaComposite.SRC_ATOP:
        return SrcAtop;
    case AlphaComposite.DST_ATOP:
        return DstAtop;
    case AlphaComposite.XOR:
        return AlphaXor;
    default:
        throw new InternalError("Unrecognized alpha rule");
    }
}
 
Example 14
Source File: CompositeType.java    From jdk8u-dev-jdk with GNU General Public License v2.0 5 votes vote down vote up
/**
 * Return a CompositeType object for the specified AlphaComposite
 * rule.
 */
public static CompositeType forAlphaComposite(AlphaComposite ac) {
    switch (ac.getRule()) {
    case AlphaComposite.CLEAR:
        return Clear;
    case AlphaComposite.SRC:
        if (ac.getAlpha() >= 1.0f) {
            return SrcNoEa;
        } else {
            return Src;
        }
    case AlphaComposite.DST:
        return Dst;
    case AlphaComposite.SRC_OVER:
        if (ac.getAlpha() >= 1.0f) {
            return SrcOverNoEa;
        } else {
            return SrcOver;
        }
    case AlphaComposite.DST_OVER:
        return DstOver;
    case AlphaComposite.SRC_IN:
        return SrcIn;
    case AlphaComposite.DST_IN:
        return DstIn;
    case AlphaComposite.SRC_OUT:
        return SrcOut;
    case AlphaComposite.DST_OUT:
        return DstOut;
    case AlphaComposite.SRC_ATOP:
        return SrcAtop;
    case AlphaComposite.DST_ATOP:
        return DstAtop;
    case AlphaComposite.XOR:
        return AlphaXor;
    default:
        throw new InternalError("Unrecognized alpha rule");
    }
}