CGDataConsumer

An abstraction for data-writing tasks that eliminates the need to manage a raw memory buffer.

Overview

Most apps should use CGImageDestination objects instead. See CGImageDestination.

Symbols

Creating Data Consumers

init?(info: UnsafeMutableRawPointer?, cbks: UnsafePointer<CGDataConsumerCallbacks>)

Creates a data consumer that uses callback functions to write data.

init?(url: CFURL)

Creates a data consumer that writes data to a location specified by a URL.

init?(data: CFMutableData)

Creates a data consumer that writes to a CFData object.

Getting the CFType ID

class var typeID: CFTypeID

Returns the Core Foundation type identifier for Core Graphics data consumers.

Callbacks

CGDataConsumerPutBytesCallback

Copies data from a Core Graphics-supplied buffer into a data consumer.

CGDataConsumerReleaseInfoCallback

Releases any private data or resources associated with the data consumer.

Data Types

CGDataConsumerCallbacks

A structure that contains pointers to callback functions that manage the copying of data for a data consumer.

CGDataConsumer

An abstraction for data-writing tasks that eliminates the need to manage a raw memory buffer.