---
title: "CGRectMake(_:_:_:_:)"
framework: coregraphics
role: symbol
role_heading: Function
path: "coregraphics/cgrectmake(_:_:_:_:)"
---

# CGRectMake(_:_:_:_:)

Returns a rectangle with the specified coordinate and size values.

## Declaration

```swift
func CGRectMake(_ x: CGFloat, _ y: CGFloat, _ width: CGFloat, _ height: CGFloat) -> CGRect
```

## Parameters

- `x`: The x-coordinate of the rectangle’s origin point.
- `y`: The y-coordinate of the rectangle’s origin point.
- `width`: The width of the rectangle.
- `height`: The height of the rectangle.

## Return Value

Return Value A rectangle with the specified location and dimensions.

## See Also

### Creating a Geometric Primitive from Values

- [CGPointMake(_:_:)](coregraphics/cgpointmake(_:_:).md)
- [CGSizeMake(_:_:)](coregraphics/cgsizemake(_:_:).md)
- [CGVectorMake(_:_:)](coregraphics/cgvectormake(_:_:).md)
