CGDataProviderGetBytesAtPositionCallback
A callback function that copies data from the provider into a Core Graphics buffer.
Declaration
typealias CGDataProviderGetBytesAtPositionCallback = (UnsafeMutableRawPointer?, UnsafeMutableRawPointer, off_t, Int) -> IntParameters
- info:
A generic pointer to private data shared among your callback functions. This is the same pointer you supplied to Init(directinfo:size:callbacks:).
- buffer:
The Core Graphics buffer into which you copy the specified number of bytes.
- position:
Specifies the relative location in the data provider at which to begin copying data.
- count:
The number of bytes to copy.
Return Value
The number of bytes copied. If no more data can be written to the buffer, you should return 0.
Discussion
When Core Graphics is ready to receive data from the provider, your function is called.