<!--
{
  "availability" : [
    "macCatalyst: 13.1.0 -",
    "macOS: 10.5.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "CoreGraphics",
  "identifier" : "/documentation/CoreGraphics/CGEventSource/pixelsPerLine",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Property",
  "symbol" : {
    "kind" : "Instance Property",
    "modules" : [
      "Core Graphics",
      "CoreGraphics"
    ],
    "preciseIdentifier" : "c:@F@CGEventSourceGetPixelsPerLine"
  },
  "title" : "pixelsPerLine"
}
-->

# pixelsPerLine

Gets the scale of pixels per line in a scrolling event source.

```
var pixelsPerLine: Double { get set }
```

## Discussion

This function returns the scale of pixels per line in the specified event source. For example, if the scale in the event source is 10.5 pixels per line, this function would return 10.5. Every scrolling event can be interpreted to be scrolling by pixel or by line. By default, the scale is about ten pixels per line. You can alter the scale with the function `CGEventSourceSetPixelsPerLine`.

## See Also

[`CGEventSourceSetPixelsPerLine`](/documentation/CoreGraphics/CGEventSourceSetPixelsPerLine)

Sets the scale of pixels per line in a scrolling event source.



---

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)