<!--
{
  "availability" : [
    "iOS: -",
    "iPadOS: -",
    "macCatalyst: -",
    "macOS: -",
    "tvOS: -",
    "visionOS: -",
    "watchOS: -"
  ],
  "documentType" : "symbol",
  "framework" : "CoreGraphics",
  "identifier" : "/documentation/CoreGraphics/CGRectMake(_:_:_:_:)",
  "metadataVersion" : "0.1.0",
  "role" : "Function",
  "symbol" : {
    "kind" : "Function",
    "modules" : [
      "Core Graphics"
    ],
    "preciseIdentifier" : "c:@F@CGRectMake"
  },
  "title" : "CGRectMake(_:_:_:_:)"
}
-->

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

Returns a rectangle with the specified coordinate and size values.

```
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

A rectangle with the specified location and dimensions.

## Discussion

---

Copyright &copy; 2026 Apple Inc. All rights reserved. | [Terms of Use](https://www.apple.com/legal/internet-services/terms/site.html) | [Privacy Policy](https://www.apple.com/privacy/privacy-policy)