---
title: "contentShape(_:eoFill:)"
framework: swiftui
role: symbol
role_heading: Instance Method
path: "swiftui/view/contentshape(_:eofill:)"
---

# contentShape(_:eoFill:)

Defines the content shape for hit testing.

## Declaration

```swift
nonisolated func contentShape<S>(_ shape: S, eoFill: Bool = false) -> some View where S : Shape

```

## 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.

## Return Value

Return Value A view that uses the given shape for hit testing.

## See Also

### Controlling hit testing

- [allowsTightening(_:)](swiftui/view/allowstightening(_:).md)
- [contentShape(_:_:eoFill:)](swiftui/view/contentshape(_:_:eofill:).md)
- [ContentShapeKinds](swiftui/contentshapekinds.md)
