Enum BlendMode

  • All Implemented Interfaces:

    
    public enum BlendMode
    
                        

    List of blending modes available for the annotations that can be set by setBlendMode.

    • Nested Class Summary

      Nested Classes 
      Modifier and Type Class Description
    • Field Summary

      Fields 
      Modifier and Type Field Description
    • Constructor Summary

      Constructors 
      Constructor Description
    • Enum Constant Summary

      Enum Constants 
      Enum Constant Description
      NORMAL

      B(cb,cs) = cs Selects the source colour, ignoring the backdrop.

      See also PorterDuff.Mode#SRC

      MULTIPLY

      B(cb,cs) = cb×cs Multiplies the backdrop and source colour values. The result colour is always at least as dark as either of the two constituent colours. Multiplying any colour with black produces black; multiplying with white leaves the original colour unchanged. Painting successive overlapping objects with a colour other than black or white produces progressively darker colours.

      See also PorterDuff.Mode#MULTIPLY

      SCREEN

      B(cb,cs) = 1 – [(1–cb)×(1–cs)] = cb + cs – (cb × cs) Multiplies the complements of the backdrop and source colour values, then complements the result. The result colour is always at least as light as either of the two constituent colours. Screening any colour with white produces white; screening with black leaves the original colour unchanged. The effect is similar to projecting multiple photographic slides simultaneously onto a single screen.

      See also PorterDuff.Mode#SCREEN

      OVERLAY

      B(cb, cs) = HardLight(cs, cb) Multiplies or screens the colours, depending on the backdrop colour value. Source colours overlay the backdrop while preserving its highlights and shadows. The backdrop colour is not replaced but is mixed with the source colour to reflect the lightness or darkness of the backdrop.

      See also PorterDuff.Mode#OVERLAY

      DARKEN

      B(cb, cs) = min(cb, cs) Selects the darker of the backdrop and source colours. The backdrop is replaced with the source where the source is darker; otherwise, it is left unchanged.

      See also PorterDuff.Mode#DARKEN

      LIGHTEN

      B(cb, cs) = max(cb, cs) Selects the lighter of the backdrop and source colours. The backdrop is replaced with the source where the source is lighter; otherwise, it is left unchanged.

      See also PorterDuff.Mode#LIGHTEN

      COLOR_DODGE

      Brightens the backdrop colour to reflect the source colour. Painting with black produces no changes.

      COLOR_BURN

      Darkens the backdrop colour to reflect the source colour. Painting with white produces no change.

      SOFT_LIGHT

      Darkens or lightens the colours, depending on the source colour value. The effect is similar to shining a diffused spotlight on the backdrop.

      HARD_LIGHT

      Multiplies or screens the colours, depending on the source colour value. The effect is similar to shining a harsh spotlight on the backdrop.

      DIFFERENCE

      B(cb,cs) = cb–cs Subtracts the darker of the two constituent colours from the lighter colour: Painting with white inverts the backdrop colour; painting with black produces no change.

      EXCLUSION

      B(cb,cs) = cb+cs–2×cb×cs Produces an effect similar to that of the Difference mode but lower in contrast. Painting with white inverts the backdrop colour; painting with black produces no change.

    • Method Summary

      Modifier and Type Method Description
      static Array<BlendMode> values() Returns an array containing the constants of this enum type, in the order they're declared.
      static BlendMode valueOf(String name) Returns the enum constant of this type with the specified name.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

    • Method Detail

      • values

         static Array<BlendMode> values()

        Returns an array containing the constants of this enum type, in the order they're declared. This method may be used to iterate over the constants.

        Returns:

        an array containing the constants of this enum type, in the order they're declared

      • valueOf

         static BlendMode valueOf(String name)

        Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)

        Returns:

        the enum constant with the specified name