CGDataProvider

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

Overview

Data provider objects abstract the data-access task and eliminate the need for applications to manage data through a raw memory buffer.

For information on how to use CGDataProvider functions, see Quartz 2D Programming Guide Programming Guide.

See also CGDataConsumer.

Topics

CGDataProvider Miscellaneous Functions

CGDataProviderCreate

Creates a sequential-access data provider.

CGDataProviderCreateDirectAccess

Creates a direct-access data provider.

CGDataProviderCreateWithData

Creates a direct-access data provider that uses data your program supplies.

CGDataProviderCreateWithURL

Creates a direct-access data provider that uses a URL to supply data.

CGDataProviderCreateWithFilename

Creates a direct-access data provider that uses a file to supply data.

CGDataProviderCreateWithCFData

Creates a data provider that reads from a CFData object.

CGDataProviderGetTypeID

Returns the Core Foundation type identifier for data providers.

CGDataProviderCopyData

Returns a copy of the provider’s data.

CGDataProviderRelease

Decrements the retain count of a data provider.

CGDataProviderRetain

Increments the retain count of a data provider.

CGDataProviderCreateSequential

Creates a sequential-access data provider.

CGDataProviderCreateDirect

Creates a direct-access data provider.

Callbacks

CGDataProviderGetBytesCallback

A callback function that copies from a provider data stream into a Core Graphics buffer.

CGDataProviderReleaseInfoCallback

A callback function that releases any private data or resources associated with the data provider.

CGDataProviderRewindCallback

A callback function that moves the current position in the data stream back to the beginning.

CGDataProviderSkipBytesCallback

A callback function that advances the current position in the data stream supplied by the provider.

CGDataProviderSkipForwardCallback

A callback function that advances the current position in the data stream supplied by the provider.

CGDataProviderGetBytePointerCallback

A callback function that returns a generic pointer to the provider data.

CGDataProviderGetBytesAtOffsetCallback

A callback function that copies data from the provider into a Core Graphics buffer.

CGDataProviderReleaseBytePointerCallback

A callback function that releases the pointer Core Graphics obtained by calling CGDataProviderGetBytePointerCallback.

CGDataProviderReleaseDataCallback

A callback function that releases data you supply to the function CGDataProviderCreateWithData.

CGDataProviderGetBytesAtPositionCallback

A callback function that copies data from the provider into a Core Graphics buffer.

Data Types

CGDataProviderRef

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

CGDataProviderCallbacks

Defines a structure containing pointers to client-defined callback functions that manage the sending of data for a sequential-access data provider.

CGDataProviderDirectAccessCallbacks

Defines pointers to client-defined callback functions that manage the sending of data for a direct-access data provider.

CGDataProviderDirectCallbacks

Defines pointers to client-defined callback functions that manage the sending of data for a direct-access data provider.

CGDataProviderSequentialCallbacks

Defines a structure containing pointers to client-defined callback functions that manage the sending of data for a sequential-access data provider.

See Also

Opaque Types

CGBitmapContext

A type of CGContextRef that you can use for drawing bits to memory.

CGColor

A set of components that define a color, with a color space specifying how to interpret them.

CGColorConversionInfo

An object that describes how to convert between color spaces for use by other system services.

CGColorSpace

A profile that specifies how to interpret a color value for display.

CGContext

A Quartz 2D drawing destination.

CGDataConsumer

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

CGFont

A set of character glyphs and layout information for drawing text.

CGFunction

A general facility for defining and using callback functions.

CGGLContext

Deprecated. A type of CGContextRef for drawing OpenGL content.

CGGradient

A definition for a smooth transition between colors for drawing radial and axial gradient fills.

CGImage

A bitmap image or image mask.

CGLayer

An offscreen context for reusing content drawn with Core Graphics.

CGPath

Immutable and mutable types for graphics paths: mathematical descriptions of shapes or lines to be drawn in a graphics context.

CGPattern

A 2D pattern to be used for drawing graphics paths.

CGPDFArray

An array structure within a PDF document.

CGPDFContentStream

A representation of one or more content data streams in a PDF page.

CGPDFContext

A type of CGContextRef for drawing PDF content.

CGPDFDictionary

A dictionary structure within a PDF document.

CGPDFDocument

A document that contains PDF (Portable Document Format) drawing information.

CGPDFObject

An object representing content within a PDF document.

CGPDFOperatorTable

A set of callback functions for operators used when scanning content in a PDF document.

CGPDFPage

A page in a PDF document.

CGPDFScanner

A parser object for handling content and operators in a PDF content stream.

CGPDFStream

A stream or sequence of data bytes in a PDF document.

CGPDFString

A text string in a PDF document.

CGPSConverter

An object that converts PostScript data to PDF data.

CGShading

A definition for a smooth transition between colors, controlled by a custom function you provide, for drawing radial and axial gradient fills.