diff --git a/Sources/ShapeUp/Emboss/EmbossViewModifier.swift b/Sources/ShapeUp/Emboss/EmbossViewModifier.swift index c51247f..e2efcf0 100644 --- a/Sources/ShapeUp/Emboss/EmbossViewModifier.swift +++ b/Sources/ShapeUp/Emboss/EmbossViewModifier.swift @@ -29,49 +29,49 @@ struct EmbossViewModifier: ViewModifier { func body(content: Content) -> some View { content .opacity(baseColor == nil ? 1 : 0) - .overlay( + .overlay { ZStack { baseColor Color.white .accessibilityIgnoresInvertColors() - .mask( + .mask { Color.white - .overlay( + .overlay { Color.black - .mask( + .mask { content .offset(x: offsetX, y: offsetY) - ) - ) + } + } .blur(radius: blur) .drawingGroup() .luminanceToAlpha() - ) + } .opacity(opacity) .allowsHitTesting(false) - .accessibility(hidden: true) + .accessibilityHidden(true) Color.black .accessibilityIgnoresInvertColors() - .mask( + .mask { Color.white - .overlay( + .overlay { Color.black - .mask( + .mask { content .offset(x: -offsetX, y: -offsetY) - ) - ) + } + } .blur(radius: blur) .drawingGroup() .luminanceToAlpha() - ) + } .opacity(opacity) .allowsHitTesting(false) - .accessibility(hidden: true) + .accessibilityHidden(true) } - ) - .mask(content) + } + .mask { content } } } diff --git a/Sources/ShapeUp/Rect/CGFrame.swift b/Sources/ShapeUp/Rect/CGFrame.swift index 27572e1..dd11d5e 100644 --- a/Sources/ShapeUp/Rect/CGFrame.swift +++ b/Sources/ShapeUp/Rect/CGFrame.swift @@ -113,7 +113,7 @@ public extension CGFrameRepresentable { /// A coordinate frame defined by an origin and a vector for each axis. -public struct CGFrame: CGFrameRepresentable { +public struct CGFrame: CGFrameRepresentable, Sendable { /// The origin point of the coordinate frame. public var origin: CGPoint /// The vector defining the x-axis direction and magnitude. diff --git a/Sources/ShapeUp/_Extension-Public/InsettableShape+publicExtensions.swift b/Sources/ShapeUp/_Extension-Public/InsettableShape+publicExtensions.swift index 6185413..e19cad2 100644 --- a/Sources/ShapeUp/_Extension-Public/InsettableShape+publicExtensions.swift +++ b/Sources/ShapeUp/_Extension-Public/InsettableShape+publicExtensions.swift @@ -28,7 +28,7 @@ public extension InsettableShape { return self .fill(backgroundColor) - .overlay( + .overlay { ZStack { self .inset(by: inset) @@ -43,7 +43,7 @@ public extension InsettableShape { .accessibilityIgnoresInvertColors() .clipShape(self) .blendMode(.overlay) - ) + } } /// Returns a view with debossed edges that matches the parent shape. diff --git a/Sources/ShapeUp/_Extension-Public/View+publicExtensions.swift b/Sources/ShapeUp/_Extension-Public/View+publicExtensions.swift index c848dd6..a539082 100644 --- a/Sources/ShapeUp/_Extension-Public/View+publicExtensions.swift +++ b/Sources/ShapeUp/_Extension-Public/View+publicExtensions.swift @@ -21,11 +21,11 @@ public extension View { /// - Returns: The same view with an overlayed embossed effect using edges of a supplied shape. func emboss(using shape: S, size: CGFloat, angle: Angle? = nil, opacity: Double? = nil) -> some View where S : InsettableShape { self - .overlay( + .overlay { shape .embossEdges(size: size, angle: angle, opacity: opacity) .allowsHitTesting(false) - ) + } } /// Returns the same view with an overlayed debossed effect using edges of a supplied shape. @@ -41,11 +41,11 @@ public extension View { /// - Returns: The same view with an overlayed debossed effect using edges of a supplied shape. func deboss(using shape: S, size: CGFloat, angle: Angle? = nil, opacity: Double? = nil) -> some View where S : InsettableShape { self - .overlay( + .overlay { shape .debossEdges(size: size, angle: angle, opacity: opacity) .allowsHitTesting(false) - ) + } } /// Returns the same view with an overlayed embossed effect.