Skia
2D Graphics Library
SkMultiPictureDocument Namespace Reference

Functions

SK_API sk_sp< SkDocumentMake (SkWStream *dst, const SkSerialProcs *=nullptr, std::function< void(const SkPicture *)> onEndPage=nullptr)
 Writes into a file format that is similar to SkPicture::serialize() Accepts a callback for endPage behavior. More...
 
SK_API int ReadPageCount (SkStreamSeekable *src)
 Returns the number of pages in the SkMultiPictureDocument. More...
 
SK_API bool Read (SkStreamSeekable *src, SkDocumentPage *dstArray, int dstArrayCount, const SkDeserialProcs *=nullptr)
 Read the SkMultiPictureDocument into the provided array of pages. More...
 

Function Documentation

◆ Make()

SK_API sk_sp<SkDocument> SkMultiPictureDocument::Make ( SkWStream dst,
const SkSerialProcs = nullptr,
std::function< void(const SkPicture *)>  onEndPage = nullptr 
)

Writes into a file format that is similar to SkPicture::serialize() Accepts a callback for endPage behavior.

◆ Read()

SK_API bool SkMultiPictureDocument::Read ( SkStreamSeekable src,
SkDocumentPage dstArray,
int  dstArrayCount,
const SkDeserialProcs = nullptr 
)

Read the SkMultiPictureDocument into the provided array of pages.

dstArrayCount must equal SkMultiPictureDocumentReadPageCount(). Return false on error.

◆ ReadPageCount()

SK_API int SkMultiPictureDocument::ReadPageCount ( SkStreamSeekable src)

Returns the number of pages in the SkMultiPictureDocument.