API Overview API Index Package Overview Direct link to this page
JDK 1.6
  java.awt. AlphaComposite View Source
Author(s)
Since
Version
10 Feb 1997
Serial
Hierarchy
 Object
      AlphaComposite
Implements
 Composite
Subclasses
Description
publicfinal class AlphaComposite
  The AlphaComposite class implements basic alpha compositing rules for combining source and destination colors to achieve blending and transparency effects with graphics and images.
See also:    Composite CompositeContext
Constructors
private AlphaComposite (int rule)
private AlphaComposite (int rule, float alpha)
Methods
Hide/Show inherited methods
public CompositeContext createContext (ColorModel srcColorModel, ColorModel dstColorModel, RenderingHints hints) [Specified in Composite]
  Creates a context for the compositing operation.
public AlphaComposite derive (float alpha)
  Returns a similar AlphaComposite object that uses the specified alpha value.
public AlphaComposite derive (int rule)
  Returns a similar AlphaComposite object that uses the specified compositing rule.
public boolean equals (Object obj)
  Determines whether the specified object is equal to this AlphaComposite.
public float getAlpha ()
  Returns the alpha value of this AlphaComposite.
publicstatic AlphaComposite getInstance (int rule)
  Creates an AlphaComposite object with the specified rule.
publicstatic 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.
public int getRule ()
  Returns the compositing rule of this AlphaComposite.
public int hashCode ()
  Returns the hashcode for this composite.
Fields
Hide/Show inherited fields
publicfinalstatic AlphaComposite Clear
  AlphaComposite object that implements the opaque CLEAR rule with an alpha of 1.0f.
publicfinalstatic int CLEAR = "1"
  Both the color and the alpha of the destination are cleared (Porter-Duff Clear rule).
publicfinalstatic AlphaComposite Dst
  AlphaComposite object that implements the opaque DST rule with an alpha of 1.0f.
publicfinalstatic int DST = "9"
  The destination is left untouched (Porter-Duff Destination rule).
publicfinalstatic int DST_ATOP = "11"
  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).
publicfinalstatic int DST_IN = "6"
  The part of the destination lying inside of the source replaces the destination (Porter-Duff Destination In Source rule).
publicfinalstatic int DST_OUT = "8"
  The part of the destination lying outside of the source replaces the destination (Porter-Duff Destination Held Out By Source rule).
publicfinalstatic int DST_OVER = "4"
  The destination is composited over the source and the result replaces the destination (Porter-Duff Destination Over Source rule).
publicfinalstatic AlphaComposite DstAtop
  AlphaComposite object that implements the opaque DST_ATOP rule with an alpha of 1.0f.
publicfinalstatic AlphaComposite DstIn
  AlphaComposite object that implements the opaque DST_IN rule with an alpha of 1.0f.
publicfinalstatic AlphaComposite DstOut
  AlphaComposite object that implements the opaque DST_OUT rule with an alpha of 1.0f.
publicfinalstatic AlphaComposite DstOver
  AlphaComposite object that implements the opaque DST_OVER rule with an alpha of 1.0f.
pack-private float extraAlpha
pack-private int rule
publicfinalstatic AlphaComposite Src
  AlphaComposite object that implements the opaque SRC rule with an alpha of 1.0f.
publicfinalstatic int SRC = "2"
  The source is copied to the destination (Porter-Duff Source rule).
publicfinalstatic int SRC_ATOP = "10"
  The part of the source lying inside of the destination is composited onto the destination (Porter-Duff Source Atop Destination rule).
publicfinalstatic int SRC_IN = "5"
  The part of the source lying inside of the destination replaces the destination (Porter-Duff Source In Destination rule).
publicfinalstatic int SRC_OUT = "7"
  The part of the source lying outside of the destination replaces the destination (Porter-Duff Source Held Out By Destination rule).
publicfinalstatic int SRC_OVER = "3"
  The source is composited over the destination (Porter-Duff Source Over Destination rule).
publicfinalstatic AlphaComposite SrcAtop
  AlphaComposite object that implements the opaque SRC_ATOP rule with an alpha of 1.0f.
publicfinalstatic AlphaComposite SrcIn
  AlphaComposite object that implements the opaque SRC_IN rule with an alpha of 1.0f.
publicfinalstatic AlphaComposite SrcOut
  AlphaComposite object that implements the opaque SRC_OUT rule with an alpha of 1.0f.
publicfinalstatic AlphaComposite SrcOver
  AlphaComposite object that implements the opaque SRC_OVER rule with an alpha of 1.0f.
publicfinalstatic AlphaComposite Xor
  AlphaComposite object that implements the opaque XOR rule with an alpha of 1.0f.
publicfinalstatic int XOR = "12"
  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).
Nested Classes
Generated By: JavaOnTracks Doclet 0.1.4     ©Thibaut Colar