File tree Expand file tree Collapse file tree 1 file changed +36
-0
lines changed
Sources/OpenSwiftUICore/Graphic/BlurStyle Expand file tree Collapse file tree 1 file changed +36
-0
lines changed Original file line number Diff line number Diff line change 1+ //
2+ // VariableBlurEffect.swift
3+ // OpenSwiftUICore
4+ //
5+ // Audited for 6.5.4
6+ // Status: Blocked by Image resolving
7+ // ID: 6A2330B0C22A93F083499CFD6C3BD5B1 (SwiftUICore)
8+
9+ public import Foundation
10+
11+ // MARK: - VariableBlurEffect
12+
13+ private struct VariableBlurEffect : EnvironmentalModifier , Equatable {
14+ var radius : CGFloat
15+ var mask : Image
16+ var isOpaque : Bool
17+
18+ typealias ResolvedModifier = VariableBlurStyle
19+
20+ func resolve( in environment: EnvironmentValues ) -> VariableBlurStyle {
21+ // TODO: Image resolving
22+ return VariableBlurStyle (
23+ radius: radius,
24+ isOpaque: isOpaque,
25+ mask: . none
26+ )
27+ }
28+ }
29+
30+ @_spi ( Private)
31+ @available ( OpenSwiftUI_v5_0, * )
32+ extension View {
33+ nonisolated public func variableBlur( maxRadius: CGFloat , mask: Image , opaque: Bool = false ) -> some View {
34+ modifier ( VariableBlurEffect ( radius: maxRadius, mask: mask, isOpaque: opaque) )
35+ }
36+ }
You can’t perform that action at this time.
0 commit comments