Class BlendMode


  • public class BlendMode
    extends java.lang.Object
    Blend mode.
    Author:
    Kühn & Weyh Software GmbH
    • Field Detail

      • NORMAL

        public static final BlendMode NORMAL
        Separable blend modes as defined in the PDF specification
      • COMPATIBLE

        public static final BlendMode COMPATIBLE
      • MULTIPLY

        public static final BlendMode MULTIPLY
      • SCREEN

        public static final BlendMode SCREEN
      • OVERLAY

        public static final BlendMode OVERLAY
      • DARKEN

        public static final BlendMode DARKEN
      • LIGHTEN

        public static final BlendMode LIGHTEN
      • COLOR_DODGE

        public static final BlendMode COLOR_DODGE
      • COLOR_BURN

        public static final BlendMode COLOR_BURN
      • HARD_LIGHT

        public static final BlendMode HARD_LIGHT
      • SOFT_LIGHT

        public static final BlendMode SOFT_LIGHT
      • DIFFERENCE

        public static final BlendMode DIFFERENCE
      • EXCLUSION

        public static final BlendMode EXCLUSION
      • HUE

        public static final BlendMode HUE
        Non-separable blend modes as defined in the PDF specification
      • SATURATION

        public static final BlendMode SATURATION
      • LUMINOSITY

        public static final BlendMode LUMINOSITY
    • Method Detail

      • getCOSName

        public COSName 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

        public BlendMode.BlendChannelFunction getBlendChannelFunction()
        Returns the blend channel function, only available for separable blend modes.
        Returns:
        the blend channel function
      • getBlendFunction

        public BlendMode.BlendFunction getBlendFunction()
        Returns the blend function, only available for non separable blend modes.
        Returns:
        the blend function
      • getInstance

        public static BlendMode getInstance​(COSBase cosBlendMode)
        Determines the blend mode from the BM entry in the COS ExtGState.
        Parameters:
        cosBlendMode - name or array
        Returns:
        blending mode
      • toString

        public java.lang.String toString()
        Overrides:
        toString in class java.lang.Object