CGDisplayCreateImage(_:rect:)
Returns an image containing the contents of a portion of the specified display.
Declaration
func CGDisplayCreateImage(_ display: CGDirectDisplayID, rect: CGRect) -> CGImage?Parameters
- display:
The identifier of the display to be accessed.
- rect:
The rectangle, specified in display space, for the portion of the display being copied into the image.
Return Value
An image containing the contents of the specified rectangle. If the display ID is invalid, the return value is NULL. In Objective-C, you’re responsible for releasing the image created by calling CGImageRelease.
Discussion
The actual rectangle used is the rectangle returned by CGRectIntegral(_:) with rect as a parameter.
See Also
Functions
CGAcquireDisplayFadeReservation(_:_:)CGAssociateMouseAndMouseCursorPosition(_:)CGBeginDisplayConfiguration(_:)CGCancelDisplayConfiguration(_:)CGCaptureAllDisplays()CGCaptureAllDisplaysWithOptions(_:)CGCompleteDisplayConfiguration(_:_:)CGConfigureDisplayFadeEffect(_:_:_:_:_:_:)CGConfigureDisplayMirrorOfDisplay(_:_:_:)CGConfigureDisplayMode(_:_:_:)CGConfigureDisplayOrigin(_:_:_:_:)CGConfigureDisplayStereoOperation(_:_:_:_:)CGConfigureDisplayWithDisplayMode(_:_:_:_:)CGCursorIsDrawnInFramebuffer()CGCursorIsVisible()