GraphicsContextBlendMode

The ways that a graphics context combines new content with background content.

StructureiOS 15.0+macOS 12.0+tvOS 15.0+watchOS 8.0+GraphicsContext.BlendMode in SwiftUI

Declaration

React
type GraphicsContextBlendMode =
  | 'clear'
  | 'color'
  | 'colorBurn'
  | 'colorDodge'
  | 'copy'
  | 'darken'
  | 'destinationAtop'
  | 'destinationIn'
  | 'destinationOut'
  | 'destinationOver'
  | 'difference'
  | 'exclusion'
  | 'hardLight'
  | 'hue'
  | 'lighten'
  | 'luminosity'
  | 'multiply'
  | 'normal'
  | 'overlay'
  | 'plusDarker'
  | 'plusLighter'
  | 'saturation'
  | 'screen'
  | 'softLight'
  | 'sourceAtop'
  | 'sourceIn'
  | 'sourceOut'
  | 'xor'
  | { rawValue: number; };
Swift
@frozen struct BlendMode

Pass a literal, or build one with SwiftUI.GraphicsContextBlendMode from import { SwiftUI } from 'swiftui-react-native'.

Type properties

Type methods

Overview

Use one of these values to set the GraphicsContext.blendMode-swift.property property of a GraphicsContext. The value that you set affects how content that you draw replaces or combines with content that you previously drew into the context.

From Apple’s SwiftUI documentation. Code samples there are Swift.

See also

More in Drawing and shapes.