Function

QLPreviewRequestFlushContext

Flush the context and sets the preview response.

Declaration

void QLPreviewRequestFlushContext(QLPreviewRequestRef preview, CGContextRef context);

Parameters

preview

The preview request object.

context

The graphics context to flush.

Discussion

You should call this method immediately after drawing in the graphics contexts created by QLPreviewRequestCreateContext and QLPreviewRequestCreatePDFContext.

Special Considerations

Thread-safety: This function should be called in the same thread as the preview request is made in; generally, this is the same thread in which the GeneratePreviewForURL callback was invoked.