---
title: "isRect(_:)"
framework: coregraphics
role: symbol
role_heading: Instance Method
path: "coregraphics/cgpath/isrect(_:)"
---

# isRect(_:)

Indicates whether or not a graphics path represents a rectangle.

## Declaration

```swift
func isRect(_ rect: UnsafeMutablePointer<CGRect>?) -> Bool
```

## Parameters

- `rect`: On input, a pointer to an uninitialized rectangle. If the specified path represents a rectangle, on return contains a copy of the rectangle.

## Return Value

Return Value A Boolean value that indicates whether the specified path represents a rectangle. If the path represents a rectangle, returns true.

## See Also

### Examining a Graphics Path

- [boundingBox](coregraphics/cgpath/boundingbox.md)
- [boundingBoxOfPath](coregraphics/cgpath/boundingboxofpath.md)
- [currentPoint](coregraphics/cgpath/currentpoint.md)
- [contains(_:using:transform:)](coregraphics/cgpath/contains(_:using:transform:).md)
- [isEmpty](coregraphics/cgpath/isempty.md)
