<!--
{
  "availability" : [
    "iOS: 11.0.0 -",
    "iPadOS: 11.0.0 -",
    "macCatalyst: 13.1.0 -",
    "macOS: 10.6.0 -",
    "tvOS: 11.0.0 -",
    "visionOS: 1.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "IOSurface",
  "identifier" : "/documentation/IOSurface/IOSurfaceGetPropertyAlignment(_:)",
  "metadataVersion" : "0.1.0",
  "role" : "Function",
  "symbol" : {
    "kind" : "Function",
    "modules" : [
      "IOSurface"
    ],
    "preciseIdentifier" : "c:@F@IOSurfaceGetPropertyAlignment"
  },
  "title" : "IOSurfaceGetPropertyAlignment(_:)"
}
-->

# IOSurfaceGetPropertyAlignment(_:)

Returns the alignment requirements for a property (if any).

```
func IOSurfaceGetPropertyAlignment(_ property: CFString) -> Int
```

## Discussion

If the property has no alignment requirement then this function returns 1. The following properties should always be aligned if you choose to calculate them yourself:

- `kIOSurfaceBytesPerRow`
- `kIOSurfaceOffset`
- `kIOSurfacePlaneBase`
- `kIOSurfacePlaneOffset`
- `kIOSurfacePlaneBytesPerRow`

---

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)