---
title: "CGRectStandardize(_:)"
framework: coregraphics
role: symbol
role_heading: Function
path: "coregraphics/cgrectstandardize(_:)"
---

# CGRectStandardize(_:)

Returns a rectangle with a positive width and height.

## Declaration

```swift
func CGRectStandardize(_ rect: CGRect) -> CGRect
```

## Parameters

- `rect`: The source rectangle.

## Return Value

Return Value A rectangle that represents the source rectangle, but with positive width and height values. Returns a null rectangle if rect is a null rectangle.

## See Also

### Modifying Rectangles

- [CGRectInset(_:_:_:)](coregraphics/cgrectinset(_:_:_:).md)
- [CGRectIntegral(_:)](coregraphics/cgrectintegral(_:).md)
- [CGRectIntersection(_:_:)](coregraphics/cgrectintersection(_:_:).md)
- [CGRectOffset(_:_:_:)](coregraphics/cgrectoffset(_:_:_:).md)
- [CGRectUnion(_:_:)](coregraphics/cgrectunion(_:_:).md)
