java.awt

Class AlphaComposite

public final class AlphaComposite extends Object implements Composite

Since: 1.3

See Also: Composite CompositeContext

UNKNOWN: updated to 1.4 except for createContext, needs documentation

Field Summary
static AlphaCompositeClear
static intCLEAR
static AlphaCompositeDst
static AlphaCompositeDstAtop
static AlphaCompositeDstIn
static AlphaCompositeDstOut
static AlphaCompositeDstOver
static intDST
static intDST_ATOP
static intDST_IN
static intDST_OUT
static intDST_OVER
static AlphaCompositeSrc
static AlphaCompositeSrcAtop
static AlphaCompositeSrcIn
static AlphaCompositeSrcOut
static AlphaCompositeSrcOver
static intSRC
static intSRC_ATOP
static intSRC_IN
static intSRC_OUT
static intSRC_OVER
static AlphaCompositeXor
static intXOR
Method Summary
CompositeContextcreateContext(ColorModel srcColorModel, ColorModel dstColorModel, RenderingHints hints)
Creates a {@link CompositeContext} that can be used to perform compositing operations according to this AlphaComposite settings.
booleanequals(Object o)
floatgetAlpha()
static AlphaCompositegetInstance(int rule)
Creates an AlphaComposite object with the specified rule.
static AlphaCompositegetInstance(int rule, float alpha)
Creates an AlphaComposite object with the specified rule and the constant alpha to multiply with the alpha of the source.
intgetRule()
inthashCode()

Field Detail

Clear

public static final AlphaComposite Clear

CLEAR

public static final int CLEAR

Dst

public static final AlphaComposite Dst

DstAtop

public static final AlphaComposite DstAtop

DstIn

public static final AlphaComposite DstIn

DstOut

public static final AlphaComposite DstOut

DstOver

public static final AlphaComposite DstOver

DST

public static final int DST

DST_ATOP

public static final int DST_ATOP

DST_IN

public static final int DST_IN

DST_OUT

public static final int DST_OUT

DST_OVER

public static final int DST_OVER

Src

public static final AlphaComposite Src

SrcAtop

public static final AlphaComposite SrcAtop

SrcIn

public static final AlphaComposite SrcIn

SrcOut

public static final AlphaComposite SrcOut

SrcOver

public static final AlphaComposite SrcOver

SRC

public static final int SRC

SRC_ATOP

public static final int SRC_ATOP

SRC_IN

public static final int SRC_IN

SRC_OUT

public static final int SRC_OUT

SRC_OVER

public static final int SRC_OVER

Xor

public static final AlphaComposite Xor

XOR

public static final int XOR

Method Detail

createContext

public CompositeContext createContext(ColorModel srcColorModel, ColorModel dstColorModel, RenderingHints hints)
Creates a {@link CompositeContext} that can be used to perform compositing operations according to this AlphaComposite settings.

Parameters: srcColorModel the color model of the source raster dstColorModel the color model of the destination raster hints the rendering hints to use

Returns: a {@link CompositeContext} that can be used to perform compositing operations according to this AlphaComposite settings

equals

public boolean equals(Object o)

getAlpha

public float getAlpha()

getInstance

public static AlphaComposite getInstance(int rule)
Creates an AlphaComposite object with the specified rule.

Parameters: rule The compositing rule.

Throws: IllegalArgumentException If rule is not one of the following: CLEAR, SRC, DST, SRC_OVER, DST_OVER, SRC_IN, DST_IN, SRC_OUT, DST_OUT, SRC_ATOP, DST_ATOP, or XOR.

getInstance

public static AlphaComposite getInstance(int rule, float alpha)
Creates an AlphaComposite object with the specified rule and the constant alpha to multiply with the alpha of the source. The source is multiplied with the specified alpha before being composited with the destination.

Parameters: rule The compositing rule.

Throws: IllegalArgumentException If rule is not one of the following: CLEAR, SRC, DST, SRC_OVER, DST_OVER, SRC_IN, DST_IN, SRC_OUT, DST_OUT, SRC_ATOP, DST_ATOP, or XOR.

getRule

public int getRule()

hashCode

public int hashCode()