Flutter Engine
The Flutter Engine
SkMultiPictureDocument.h
Go to the documentation of this file.
1/*
2 * Copyright 2023 Google LLC
3 *
4 * Use of this source code is governed by a BSD-style license that can be
5 * found in the LICENSE file.
6 */
7
8#ifndef SkMultiPictureDocument_DEFINED
9#define SkMultiPictureDocument_DEFINED
10
13#include "include/core/SkSize.h"
15
16#include <functional>
17
18class SkDocument;
20class SkWStream;
21struct SkDeserialProcs;
22struct SkSerialProcs;
23
27};
28
30/**
31 * Writes into a file format that is similar to SkPicture::serialize()
32 * Accepts a callback for endPage behavior
33 */
35 std::function<void(const SkPicture*)> onEndPage = nullptr);
36
37/**
38 * Returns the number of pages in the SkMultiPictureDocument.
39 */
41
42/**
43 * Read the SkMultiPictureDocument into the provided array of pages.
44 * dstArrayCount must equal SkMultiPictureDocumentReadPageCount().
45 * Return false on error.
46 */
48 SkDocumentPage* dstArray,
49 int dstArrayCount,
50 const SkDeserialProcs* = nullptr);
51} // namespace SkMultiPictureDocument
52
53#endif // SkMultiPictureDocument_DEFINED
#define SK_API
Definition: SkAPI.h:35
Dart_NativeFunction function
Definition: fuchsia.cc:51
SK_API sk_sp< SkDocument > Make(SkWStream *dst, const SkSerialProcs *=nullptr, std::function< void(const SkPicture *)> onEndPage=nullptr)
SK_API bool Read(SkStreamSeekable *src, SkDocumentPage *dstArray, int dstArrayCount, const SkDeserialProcs *=nullptr)
SK_API int ReadPageCount(SkStreamSeekable *src)
dst
Definition: cp.py:12
sk_sp< SkPicture > fPicture
Definition: SkSize.h:52