Skip to content

Add content shape modifier.  #548

@shial4

Description

@shial4

Describe the bug

Missing functionality for hit testing & content shape area

Expected behaviour

Add missing functionality and verify gesture start against the shape fill area.

extension View {
    /// Defines the content shape for hit testing.
    /// - Parameters:
    ///   - shape: The hit testing shape for the view.
    ///   - eoFill: A Boolean that indicates whether the shape is interpreted with the even-odd winding number rule.
    /// - Returns: A view that uses the given shape for hit testing.
    @inlinable public func contentShape<S: Shape>(
        _ shape: S,
        eoFill: Bool = false
    ) -> some View {
        // TODO: Add content shape modifier. Verify gesture start against the shape fill area.
        self
    }
}

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions