|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object de.lmu.ifi.dbs.elki.data.images.BlendComposite
public class BlendComposite
Class to use in Graphics2D.setComposite(java.awt.Composite)
that facilitates
basic image blending such as lighten-only overlays.
Nested Class Summary | |
---|---|
(package private) class |
BlendComposite.AverageBlendingContext
Blending context for an "average" blending. |
protected class |
BlendComposite.BlendingContext
Abstract blending context that takes care of color space conversion and pixel iteration. |
(package private) class |
BlendComposite.DarkenBlendingContext
Blending context for a "darken only" blending. |
(package private) class |
BlendComposite.LightenBlendingContext
Blending context for a "lighten only" blending. |
(package private) class |
BlendComposite.MultiplyBlendingContext
Blending context for a "multiply" blending. |
(package private) class |
BlendComposite.OverlayBlendingContext
Blending context for a "overlay" blending. |
(package private) class |
BlendComposite.ScreenBlendingContext
Blending context for a "screen" blending. |
Field Summary | |
---|---|
private double |
alpha
Alpha (opacity) value. |
static int |
AVERAGE
"Average" blending. |
static int |
DARKEN
Darken-only blending. |
static int |
LIGHTEN
Lighten-only blending. |
private int |
mode
Blending mode to use. |
static int |
MULTIPLY
"Multiply" blending. |
static int |
NORMAL
Source blending, using the source image only. |
static int |
OVERLAY
"Overlay" blending. |
static int |
SCREEN
"Screen" blending. |
Constructor Summary | |
---|---|
BlendComposite(int mode)
Simplified constructor with full opacity. |
|
BlendComposite(int mode,
double alpha)
Full constructor, with alpha (opacity) value. |
Method Summary | |
---|---|
protected static int |
combineComponents(int a,
int r,
int g,
int b)
Helper function that combines separate ARGB values into a single ARGB integer. |
CompositeContext |
createContext(ColorModel srcColorModel,
ColorModel dstColorModel,
RenderingHints hints)
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final int NORMAL
public static final int LIGHTEN
public static final int DARKEN
public static final int SCREEN
public static final int MULTIPLY
public static final int OVERLAY
public static final int AVERAGE
private double alpha
private int mode
Constructor Detail |
---|
public BlendComposite(int mode)
mode
- Blending mode.public BlendComposite(int mode, double alpha)
mode
- Blending modealpha
- Opacity valueMethod Detail |
---|
public CompositeContext createContext(ColorModel srcColorModel, ColorModel dstColorModel, RenderingHints hints)
createContext
in interface Composite
protected static final int combineComponents(int a, int r, int g, int b)
a
- alpha component (0-255)r
- red component (0-255)g
- green component (0-255)b
- blue component (0-255)
|
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |