GraphicsContextShadowOptions

Options that configure the graphics context filter that creates shadows.

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

Declaration

React
type GraphicsContextShadowOptions =
  | ('disablesGroup'
  | 'invertsAlpha'
  | 'shadowAbove'
  | 'shadowOnly'
  | { rawValue: number; })
  | readonly ('disablesGroup'
  | 'invertsAlpha'
  | 'shadowAbove'
  | 'shadowOnly'
  | { rawValue: number; })[];
Swift
@frozen struct ShadowOptions

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

Overview

You can use a set of these options when you call Filter.shadow(color:radius:x:y:blendMode:options:) to create a Filter that adds a drop shadow to an object that you draw into a GraphicsContext.

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

See also

More in Drawing and shapes.