Fields Summary |
---|
public static final int | CLEARThe Constant CLEAR indicates that both the color and the alpha of the
destination are cleared (Porter-Duff Clear rule). |
public static final int | SRCThe Constant SRC indicates that the source is copied to the destination
(Porter-Duff Source rule). |
public static final int | DSTThe Constant DST indicates that the destination is left untouched
(Porter-Duff Destination rule). |
public static final int | SRC_OVERThe Constant SRC_OVER indicates that the source is composited over the
destination (Porter-Duff Source Over Destination rule). |
public static final int | DST_OVERThe Constant DST_OVER indicates that The destination is composited over
the source and the result replaces the destination (Porter-Duff
Destination Over Source rule). |
public static final int | SRC_INThe Constant SRC_IN indicates that the part of the source lying inside of
the destination replaces the destination (Porter-Duff Source In
Destination rule). |
public static final int | DST_INThe Constant DST_IN indicates that the part of the destination lying
inside of the source replaces the destination (Porter-Duff Destination In
Source rule). |
public static final int | SRC_OUTThe Constant SRC_OUT indicates that the part of the source lying outside
of the destination replaces the destination (Porter-Duff Source Held Out
By Destination rule). |
public static final int | DST_OUTThe Constant DST_OUT indicates that the part of the destination lying
outside of the source replaces the destination (Porter-Duff Destination
Held Out By Source rule). |
public static final int | SRC_ATOPThe Constant SRC_ATOP indicates that the part of the source lying inside
of the destination is composited onto the destination (Porter-Duff Source
Atop Destination rule). |
public static final int | DST_ATOPThe Constant DST_ATOP indicates that the part of the destination lying
inside of the source is composited over the source and replaces the
destination (Porter-Duff Destination Atop Source rule). |
public static final int | XORThe Constant XOR indicates that the part of the source that lies outside
of the destination is combined with the part of the destination that lies
outside of the source (Porter-Duff Source Xor Destination rule). |
public static final AlphaComposite | ClearAlphaComposite object with the opaque CLEAR rule and an alpha of 1.0f. |
public static final AlphaComposite | SrcAlphaComposite object with the opaque SRC rule and an alpha of 1.0f. |
public static final AlphaComposite | DstAlphaComposite object with the opaque DST rule and an alpha of 1.0f. |
public static final AlphaComposite | SrcOverAlphaComposite object with the opaque SRC_OVER rule and an alpha of 1.0f. |
public static final AlphaComposite | DstOverAlphaComposite object with the opaque DST_OVER rule and an alpha of 1.0f. |
public static final AlphaComposite | SrcInAlphaComposite object with the opaque SRC_IN rule and an alpha of 1.0f. |
public static final AlphaComposite | DstInAlphaComposite object with the opaque DST_IN rule and an alpha of 1.0f. |
public static final AlphaComposite | SrcOutAlphaComposite object with the opaque SRC_OUT rule and an alpha of 1.0f. |
public static final AlphaComposite | DstOutAlphaComposite object with the opaque DST_OUT rule and an alpha of 1.0f. |
public static final AlphaComposite | SrcAtopAlphaComposite object with the opaque SRC_ATOP rule and an alpha of 1.0f. |
public static final AlphaComposite | DstAtopAlphaComposite object with the opaque DST_ATOP rule and an alpha of 1.0f. |
public static final AlphaComposite | XorAlphaComposite object with the opaque XOR rule and an alpha of 1.0f. |
private int | ruleThe rule. |
private float | alphaThe alpha. |
Methods Summary |
---|
public java.awt.CompositeContext | createContext(java.awt.image.ColorModel srcColorModel, java.awt.image.ColorModel dstColorModel, java.awt.RenderingHints hints)Creates a CompositeContext object with the specified source ColorModel,
destination ColorModel and RenderingHints parameters for a composing
operation.
return new ICompositeContext(this, srcColorModel, dstColorModel);
|
public boolean | equals(java.lang.Object obj)Compares the AlphaComposite object with the specified object.
if (!(obj instanceof AlphaComposite)) {
return false;
}
AlphaComposite other = (AlphaComposite)obj;
return (this.rule == other.getRule() && this.alpha == other.getAlpha());
|
public float | getAlpha()Gets the alpha value of this AlphaComposite object; returns 1.0 if this
AlphaComposite object doesn't have alpha value.
return alpha;
|
public static java.awt.AlphaComposite | getInstance(int rule, float alpha)Gets the AlphaComposite instance with the specified rule and alpha value.
if (alpha == 1.0f) {
return getInstance(rule);
}
return new AlphaComposite(rule, alpha);
|
public static java.awt.AlphaComposite | getInstance(int rule)Gets the AlphaComposite instance with the specified rule.
switch (rule) {
case CLEAR:
return Clear;
case SRC:
return Src;
case DST:
return Dst;
case SRC_OVER:
return SrcOver;
case DST_OVER:
return DstOver;
case SRC_IN:
return SrcIn;
case DST_IN:
return DstIn;
case SRC_OUT:
return SrcOut;
case DST_OUT:
return DstOut;
case SRC_ATOP:
return SrcAtop;
case DST_ATOP:
return DstAtop;
case XOR:
return Xor;
default:
// awt.11D=Unknown rule
throw new IllegalArgumentException(Messages.getString("awt.11D")); //$NON-NLS-1$
}
|
public int | getRule()Gets the compositing rule of this AlphaComposite object.
return rule;
|
public int | hashCode()Returns the hash code of the AlphaComposite object.
int hash = Float.floatToIntBits(alpha);
int tmp = hash >>> 24;
hash <<= 8;
hash |= tmp;
hash ^= rule;
return hash;
|