BlendMode

public enum BlendMode : UInt32

Blending modes for compositing digital images. These are an implementation of the Porter Duff blending modes

  • Replaces destination with Alpha and Color components set to zero; a fully transparent pixel (operation: [0, 0])

    Declaration

    Swift

    case clear = 0
  • src

    Replaces destination with source. Destination alpha and color component values are ignored.

    Declaration

    Swift

    case src
  • dst

    Preserves destination, ignoring source. Drawing with Paint set to kDst has no effect.

    Declaration

    Swift

    case dst
  • Replaces destination with source blended with destination. If source is opaque, replaces destination with source. Used as the default Blend_Mode for SkPaint.

    Declaration

    Swift

    case srcOver
  • Replaces destination with destination blended with source. If destination is opaque, has no effect.

    Declaration

    Swift

    case dstOver
  • Replaces destination with source using destination opacity.

    Declaration

    Swift

    case srcIn
  • Scales destination opacity by source opacity.

    Declaration

    Swift

    case dstIn
  • Replaces destination with source using the inverse of destination opacity, drawing source fully where destination opacity is zero.

    Declaration

    Swift

    case srcOut
  • Replaces destination opacity with inverse of source opacity. If source is transparent, has no effect.

    Declaration

    Swift

    case dstOut
  • Blends destination with source using read destination opacity.

    Declaration

    Swift

    case srcATop
  • Blends destination with source using source opacity.

    Declaration

    Swift

    case dstATop
  • xor

    Blends destination by exchanging transparency of the source and destination.

    Declaration

    Swift

    case xor
  • Replaces destination with source and destination added together.

    Declaration

    Swift

    case plus
  • Replaces destination with source and destination multiplied together.

    Declaration

    Swift

    case modulate
  • Replaces destination with inverted source and destination multiplied together.

    Declaration

    Swift

    case screen
  • Replaces destination with multiply or screen, depending on destination.

    Declaration

    Swift

    case overlay
  • Replaces destination with darker of source and destination.

    Declaration

    Swift

    case darken
  • Replaces destination with lighter of source and destination.

    Declaration

    Swift

    case lighten
  • Makes destination brighter to reflect source.

    Declaration

    Swift

    case colorDodge
  • Makes destination darker to reflect source.

    Declaration

    Swift

    case colorBurn
  • Makes destination lighter or darker, depending on source.

    Declaration

    Swift

    case hardLight
  • Makes destination lighter or darker, depending on source.

    Declaration

    Swift

    case softLight
  • Subtracts darker from lighter with higher contrast.

    Declaration

    Swift

    case difference
  • Subtracts darker from lighter with lower contrast.

    Declaration

    Swift

    case exclusion
  • Multiplies source with destination, darkening image.

    Declaration

    Swift

    case multiply
  • hue

    Replaces hue of destination with hue of source, leaving saturation and luminosity unchanged.

    Declaration

    Swift

    case hue
  • Replaces saturation of destination saturation hue of source, leaving hue and luminosity unchanged.

    Declaration

    Swift

    case saturation
  • Replaces hue and saturation of destination with hue and saturation of source, leaving luminosity unchanged.

    Declaration

    Swift

    case color
  • Replaces luminosity of destination with luminosity of source, leaving hue and saturation unchanged.

    Declaration

    Swift

    case luminosity