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

# CGEventSourceSetPixelsPerLine

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

```
extern void CGEventSourceSetPixelsPerLine(CGEventSourceRef source, double pixelsPerLine);
```

## Parameters

`source`

The event source to access.

`pixelsPerLine`

The scale of pixels per line in the specified event source.

## Discussion

This function sets the scale of pixels per line in the specified event source. For example, if you pass the value 12.0 in the `pixelsPerLine` parameter, the scale of pixels per line in the event source would be changed to 12.0. 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 retrieve the scale with the function `CGEventSourceGetPixelsPerLine`.

---

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)