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

# CGConfigureDisplayOrigin(_:_:_:_:)

Configures the origin of a display relative to the global display coordinate space.

```
func CGConfigureDisplayOrigin(_ config: CGDisplayConfigRef?, _ display: CGDirectDisplayID, _ x: Int32, _ y: Int32) -> CGError
```

## Parameters

`config`

A display configuration that you acquire by calling [`CGBeginDisplayConfiguration(_:)`](/documentation/CoreGraphics/CGBeginDisplayConfiguration(_:)).

`display`

The identifier of the display to configure.

`x`

The desired x-coordinate for the upper-left corner of the display.

`y`

The desired y-coordinate for the upper-left corner of the display.

## Return Value

A result code. If the request to configure the origin of the display is successful, the result is `kCGErrorSuccess`. For other possible values, see [`CGError`](/documentation/CoreGraphics/CGError).

## Discussion

In Quartz, the upper-left corner of a display is the origin. You specify the origin of a display in the global display coordinate space. The origin of the main or primary display is `(0,0)`.

The placement of the new origin is as close as possible to the requested location, without overlapping or leaving a gap between displays.

If you use this function to change the origin of a mirrored display, the mirrored set might not include the display.

---

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)