Class BlendMode
java.lang.Object
org.apache.pdfbox.pdmodel.graphics.blend.BlendMode
Blend mode.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic interfacestatic interface -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final BlendMode.BlendFunctionprivate final BlendMode.BlendChannelFunctionstatic final BlendModestatic final BlendModestatic final BlendModestatic final BlendModestatic final BlendModestatic final BlendModestatic final BlendModeprivate static final BlendMode.BlendFunctionprivate static final BlendMode.BlendChannelFunctionprivate static final BlendMode.BlendChannelFunctionprivate static final BlendMode.BlendChannelFunctionprivate static final BlendMode.BlendChannelFunctionprivate static final BlendMode.BlendChannelFunctionprivate static final BlendMode.BlendChannelFunctionprivate static final BlendMode.BlendFunctionFunctions for the blend operation of non-separable blend modesprivate static final BlendMode.BlendChannelFunctionprivate static final BlendMode.BlendFunctionprivate static final BlendMode.BlendChannelFunctionprivate static final BlendMode.BlendChannelFunctionFunctions for the blend operation of separable blend modesprivate static final BlendMode.BlendChannelFunctionprivate static final BlendMode.BlendFunctionprivate static final BlendMode.BlendChannelFunctionprivate static final BlendMode.BlendChannelFunctionstatic final BlendModestatic final BlendModeNon-separable blend modes as defined in the PDF specificationprivate final booleanstatic final BlendModestatic final BlendModestatic final BlendModeprivate final COSNamestatic final BlendModeSeparable blend modes as defined in the PDF specificationstatic final BlendModestatic final BlendModestatic final BlendModestatic final BlendMode -
Constructor Summary
ConstructorsModifierConstructorDescriptionprivateBlendMode(COSName name, BlendMode.BlendChannelFunction blendChannel, BlendMode.BlendFunction blend) Private constructor due to the limited set of possible blend modes. -
Method Summary
Modifier and TypeMethodDescriptionprivate static intget255Value(float val) Returns the blend channel function, only available for separable blend modes.Returns the blend function, only available for non separable blend modes.The blend mode name from the BM object.static BlendModegetInstance(COSBase cosBlendMode) Determines the blend mode from the BM entry in the COS ExtGState.private static voidgetLuminosityRGB(float[] srcValues, float[] dstValues, float[] result) private static voidgetSaturationRGB(float[] srcValues, float[] dstValues, float[] result) booleanDetermines if the blend mode is a separable blend mode.toString()
-
Field Details
-
fNormal
Functions for the blend operation of separable blend modes -
fMultiply
-
fScreen
-
fOverlay
-
fDarken
-
fLighten
-
fColorDodge
-
fColorBurn
-
fHardLight
-
fSoftLight
-
fDifference
-
fExclusion
-
fHue
Functions for the blend operation of non-separable blend modes -
fSaturation
-
fColor
-
fLuminosity
-
NORMAL
Separable blend modes as defined in the PDF specification -
COMPATIBLE
-
MULTIPLY
-
SCREEN
-
OVERLAY
-
DARKEN
-
LIGHTEN
-
COLOR_DODGE
-
COLOR_BURN
-
HARD_LIGHT
-
SOFT_LIGHT
-
DIFFERENCE
-
EXCLUSION
-
HUE
Non-separable blend modes as defined in the PDF specification -
SATURATION
-
COLOR
-
LUMINOSITY
-
BLEND_MODES
-
name
-
blendChannel
-
blend
-
isSeparable
private final boolean isSeparable
-
-
Constructor Details
-
BlendMode
private BlendMode(COSName name, BlendMode.BlendChannelFunction blendChannel, BlendMode.BlendFunction blend) Private constructor due to the limited set of possible blend modes.- Parameters:
name- the corresponding COSName of the blend modeblendChannel- the blend function for separable blend modesblend- the blend function for non-separable blend modes
-
-
Method Details
-
createBlendModeMap
-
getCOSName
The blend mode name from the BM object.- Returns:
- name of blend mode.
-
isSeparableBlendMode
public boolean isSeparableBlendMode()Determines if the blend mode is a separable blend mode.- Returns:
- true for separable blend modes
-
getBlendChannelFunction
Returns the blend channel function, only available for separable blend modes.- Returns:
- the blend channel function
-
getBlendFunction
Returns the blend function, only available for non separable blend modes.- Returns:
- the blend function
-
getInstance
Determines the blend mode from the BM entry in the COS ExtGState.- Parameters:
cosBlendMode- name or array- Returns:
- blending mode
-
get255Value
private static int get255Value(float val) -
getSaturationRGB
private static void getSaturationRGB(float[] srcValues, float[] dstValues, float[] result) -
getLuminosityRGB
private static void getLuminosityRGB(float[] srcValues, float[] dstValues, float[] result) -
toString
-