---
title: CGRect
framework: corefoundation
role: symbol
role_heading: Structure
path: corefoundation/cgrect
---

# CGRect

## Declaration

```swift
struct CGRect
```

## Topics

### Initializers

- [init()](corefoundation/cgrect/init().md)
- [init(dictionaryRepresentation:)](corefoundation/cgrect/init(dictionaryrepresentation:).md)
- [init(origin:size:)](corefoundation/cgrect/init(origin:size:).md)
- [init(x:y:width:height:)](corefoundation/cgrect/init(x:y:width:height:)-27bxn.md)
- [init(x:y:width:height:)](corefoundation/cgrect/init(x:y:width:height:)-3kjh6.md)
- [init(x:y:width:height:)](corefoundation/cgrect/init(x:y:width:height:)-3xq19.md)

### Instance Properties

- [customPlaygroundQuickLook](corefoundation/cgrect/customplaygroundquicklook.md)
- [dictionaryRepresentation](corefoundation/cgrect/dictionaryrepresentation.md)
- [formattedDescription](corefoundation/cgrect/formatteddescription.md)
- [height](corefoundation/cgrect/height.md)
- [integral](corefoundation/cgrect/integral.md)
- [isEmpty](corefoundation/cgrect/isempty.md)
- [isInfinite](corefoundation/cgrect/isinfinite.md)
- [isNull](corefoundation/cgrect/isnull.md)
- [maxX](corefoundation/cgrect/maxx.md)
- [maxY](corefoundation/cgrect/maxy.md)
- [midX](corefoundation/cgrect/midx.md)
- [midY](corefoundation/cgrect/midy.md)
- [minX](corefoundation/cgrect/minx.md)
- [minY](corefoundation/cgrect/miny.md)
- [origin](corefoundation/cgrect/origin.md)
- [size](corefoundation/cgrect/size.md)
- [standardized](corefoundation/cgrect/standardized.md)
- [width](corefoundation/cgrect/width.md)

### Instance Methods

- [applying(_:)](corefoundation/cgrect/applying(_:).md)
- [clip()](corefoundation/cgrect/clip().md)
- [contains(_:)](corefoundation/cgrect/contains(_:)-6n2uh.md)
- [contains(_:)](corefoundation/cgrect/contains(_:)-8fdse.md)
- [divided(atDistance:from:)](corefoundation/cgrect/divided(atdistance:from:).md)
- [equalTo(_:)](corefoundation/cgrect/equalto(_:).md)
- [fill(using:)](corefoundation/cgrect/fill(using:).md)
- [frame(withWidth:using:)](corefoundation/cgrect/frame(withwidth:using:).md)
- [inset(by:)](corefoundation/cgrect/inset(by:).md)
- [insetBy(dx:dy:)](corefoundation/cgrect/insetby(dx:dy:).md)
- [intersection(_:)](corefoundation/cgrect/intersection(_:).md)
- [intersects(_:)](corefoundation/cgrect/intersects(_:).md)
- [offsetBy(dx:dy:)](corefoundation/cgrect/offsetby(dx:dy:).md)
- [union(_:)](corefoundation/cgrect/union(_:).md)

### Type Properties

- [infinite](corefoundation/cgrect/infinite.md)
- [null](corefoundation/cgrect/null.md)
- [zero](corefoundation/cgrect/zero.md)

## Relationships

### Conforms To

- [Animatable](swiftui/animatable.md)
- [BitwiseCopyable](swift/bitwisecopyable.md)
- [CVAttachmentValueRepresentable](corevideo/cvattachmentvaluerepresentable.md)
- [Copyable](swift/copyable.md)
- [CustomDebugStringConvertible](swift/customdebugstringconvertible.md)
- [CustomReflectable](swift/customreflectable.md)
- [Decodable](swift/decodable.md)
- [Encodable](swift/encodable.md)
- [Equatable](swift/equatable.md)
- [Escapable](swift/escapable.md)
- [Hashable](swift/hashable.md)
- [Sendable](swift/sendable.md)
- [SendableMetatype](swift/sendablemetatype.md)

## See Also

### Structures

- [CGAffineTransform](corefoundation/cgaffinetransform.md)
- [CGAffineTransformComponents](corefoundation/cgaffinetransformcomponents.md)
- [CGFloat](corefoundation/cgfloat-swift.struct.md)
- [CGPoint](corefoundation/cgpoint.md)
- [CGSize](corefoundation/cgsize.md)
- [CGVector](corefoundation/cgvector.md)
