PulpCore

pulpcore.image
Class BlendMode

java.lang.Object
  extended by pulpcore.image.BlendMode

public final class BlendMode
extends Object

An enumeration of blend modes.

The methods always returns the same object; that is, BlendMode.SrcOver() == BlendMode.SrcOver() is always true.

The BlendMode class is designed for lazy-creation of blend modes so that code shrinkers (ProGuard) can remove blend modes that an app does not use.

Author:
David Brackeen, Florent Dupont
See Also:
CoreGraphics.setBlendMode(BlendMode), Sprite.setBlendMode(BlendMode)

Method Summary
static BlendMode Add()
          Gets the Add blend mode.
static BlendMode Clear()
          Gets the Clear blend mode (Porter-Duff).
static BlendMode Dst()
          Gets the Dst blend mode (Porter-Duff).
static BlendMode DstAtop()
          Gets the DstAtop blend mode (Porter-Duff).
static BlendMode DstIn()
          Gets the DstIn blend mode (Porter-Duff).
static BlendMode DstOut()
          Gets the DstOut blend mode (Porter-Duff).
static BlendMode DstOver()
          Gets the DstOver blend mode (Porter-Duff).
static BlendMode Multiply()
          Gets the Multiply blend mode.
static BlendMode Src()
          Gets the SrcIn blend mode (Porter-Duff).
static BlendMode SrcAtop()
          Gets the SrcAtop blend mode (Porter-Duff).
static BlendMode SrcIn()
          Gets the SrcIn blend mode (Porter-Duff).
static BlendMode SrcOut()
          Gets the SrcOut blend mode (Porter-Duff).
static BlendMode SrcOver()
          Gets the SrcOver blend mode.
static BlendMode Xor()
          Gets the Xor blend mode (Porter-Duff).
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

Clear

public static BlendMode Clear()
Gets the Clear blend mode (Porter-Duff). Both the color and alpha of the destination are cleared.


Xor

public static BlendMode Xor()
Gets the Xor blend mode (Porter-Duff). The part of the source lying outside of the destination is combined with the part of the destination lying outside of the source.


Dst

public static BlendMode Dst()
Gets the Dst blend mode (Porter-Duff). Destination is left untouched.


DstOver

public static BlendMode DstOver()
Gets the DstOver blend mode (Porter-Duff). The destination is composed with the source and the result replaces the destination.


DstIn

public static BlendMode DstIn()
Gets the DstIn blend mode (Porter-Duff). The part of the destination lying inside of the source replaces the destination.


DstOut

public static BlendMode DstOut()
Gets the DstOut blend mode (Porter-Duff). The part of the destination lying outside of the source replaces the destination.


DstAtop

public static BlendMode DstAtop()
Gets the DstAtop blend mode (Porter-Duff). The part of the destination lying inside of the source is composed with the source and replace the destination.


Src

public static BlendMode Src()
Gets the SrcIn blend mode (Porter-Duff). The source is copied to the destination.


SrcIn

public static BlendMode SrcIn()
Gets the SrcIn blend mode (Porter-Duff). The part of the source lying inside of the destination replaces the destination.


SrcOut

public static BlendMode SrcOut()
Gets the SrcOut blend mode (Porter-Duff). The part of the source lying outside of the destination replaces the destination.


SrcAtop

public static BlendMode SrcAtop()
Gets the SrcAtop blend mode (Porter-Duff). The part of the source lying inside of the destination is composed with the destination.


SrcOver

public static BlendMode SrcOver()
Gets the SrcOver blend mode. The source is composited over the destination (Porter-Duff Source Over Destination rule). This is the default blend mode.


Add

public static BlendMode Add()
Gets the Add blend mode. Color components from the source are added to those of the surface.


Multiply

public static BlendMode Multiply()
Gets the Multiply blend mode. Color components from the source are multiplied by those of the surface.


PulpCore

Copyright © 2007-2009 Interactive Pulp, LLC.