Top Description Inners Fields Constructors Methods
org.apache.pdfbox.pdmodel.graphics.blend

public final Class BlendComposite

extends Object
implements Composite
Class Inheritance
All Implemented Interfaces
java.awt.Composite
Imports
java.awt.AlphaComposite, .Composite, .CompositeContext, .RenderingHints, java.awt.color.ColorSpace, java.awt.image.ColorModel, .Raster, .WritableRaster, org.apache.commons.logging.Log, .LogFactory

AWT composite for blend modes.
Author
Kühn & Weyh Software GmbH

Nested and Inner Type Summary

Modifier and TypeClass and Description
pack-priv class

Field Summary

Modifier and TypeField and Description
private final BlendMode
private final float
private static final Log
LOG

Log instance.

Constructor Summary

AccessConstructor and Description
private
BlendComposite(BlendMode blendMode, float constantAlpha)

Method Summary

Modifier and TypeMethod and Description
public CompositeContext
createContext(ColorModel
the ColorModel of the source
srcColorModel
,
ColorModel
the ColorModel of the destination
dstColorModel
,
RenderingHints
the hint that the context object uses to choose between rendering alternatives
hints
)

Implements java.awt.Composite.createContext.

Creates a context containing state that is used to perform the compositing operation.

public static Composite

Returns:

a blend composite.
getInstance
(BlendMode
Desired blend mode
blendMode
,
float
Constant alpha, must be in the inclusive range [0.0...1.0] or it will be clipped.
constantAlpha
)

Creates a blend composite

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

blendModeback to summary
private final BlendMode blendMode
constantAlphaback to summary
private final float constantAlpha
LOGback to summary
private static final Log LOG

Log instance.

Constructor Detail

BlendCompositeback to summary
private BlendComposite(BlendMode blendMode, float constantAlpha)

Method Detail

createContextback to summary
public CompositeContext createContext(ColorModel srcColorModel, ColorModel dstColorModel, RenderingHints hints)

Implements java.awt.Composite.createContext.

Doc from java.awt.Composite.createContext.

Creates a context containing state that is used to perform the compositing operation. In a multi-threaded environment, several contexts can exist simultaneously for a single Composite object.

Parameters
srcColorModel:ColorModel

the ColorModel of the source

dstColorModel:ColorModel

the ColorModel of the destination

hints:RenderingHints

the hint that the context object uses to choose between rendering alternatives

Returns:CompositeContext

the CompositeContext object used to perform the compositing operation.

Annotations
@Override
getInstanceback to summary
public static Composite getInstance(BlendMode blendMode, float constantAlpha)

Creates a blend composite

Parameters
blendMode:BlendMode

Desired blend mode

constantAlpha:float

Constant alpha, must be in the inclusive range [0.0...1.0] or it will be clipped.

Returns:Composite

a blend composite.

Exceptions
IllegalArgumentException:
if blendMode is null.
org.apache.pdfbox.pdmodel.graphics.blend back to summary

pack-priv Class BlendComposite.BlendCompositeContext

extends Object
implements CompositeContext
Class Inheritance
  • java.lang.Object
  • org.apache.pdfbox.pdmodel.graphics.blend.BlendComposite.BlendCompositeContext
All Implemented Interfaces
java.awt.CompositeContext

Field Summary

Modifier and TypeField and Description
private final ColorModel
private final ColorModel

Constructor Summary

AccessConstructor and Description
pack-priv
BlendCompositeContext(ColorModel srcColorModel, ColorModel dstColorModel)

Method Summary

Modifier and TypeMethod and Description
public void
compose(Raster
the first source for the compositing operation
src
,
Raster
the second source for the compositing operation
dstIn
,
WritableRaster
the WritableRaster into which the result of the operation is stored
dstOut
)

Implements java.awt.CompositeContext.compose.

Composes the two source Raster objects and places the result in the destination WritableRaster.

public void
dispose()

Implements java.awt.CompositeContext.dispose.

Releases resources allocated for a context.

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

dstColorModelback to summary
private final ColorModel dstColorModel
srcColorModelback to summary
private final ColorModel srcColorModel

Constructor Detail

BlendCompositeContextback to summary
pack-priv BlendCompositeContext(ColorModel srcColorModel, ColorModel dstColorModel)

Method Detail

composeback to summary
public void compose(Raster src, Raster dstIn, WritableRaster dstOut)

Implements java.awt.CompositeContext.compose.

Doc from java.awt.CompositeContext.compose.

Composes the two source Raster objects and places the result in the destination WritableRaster. Note that the destination can be the same object as either the first or second source. Note that dstIn and dstOut must be compatible with the dstColorModel passed to the createContext method of the Composite interface.

Parameters
src:Raster

the first source for the compositing operation

dstIn:Raster

the second source for the compositing operation

dstOut:WritableRaster

the WritableRaster into which the result of the operation is stored

Annotations
@Override
disposeback to summary
public void dispose()

Implements java.awt.CompositeContext.dispose.

Doc from java.awt.CompositeContext.dispose.

Releases resources allocated for a context.

Annotations
@Override