OLD | NEW |
1 | 1 |
2 /* | 2 /* |
3 * Copyright 2010 The Android Open Source Project | 3 * Copyright 2010 The Android Open Source Project |
4 * | 4 * |
5 * Use of this source code is governed by a BSD-style license that can be | 5 * Use of this source code is governed by a BSD-style license that can be |
6 * found in the LICENSE file. | 6 * found in the LICENSE file. |
7 */ | 7 */ |
8 | 8 |
9 | 9 |
10 #ifndef SkPDFDocument_DEFINED | 10 #ifndef SkPDFDocument_DEFINED |
(...skipping 11 matching lines...) Expand all Loading... |
22 class SkPDFObject; | 22 class SkPDFObject; |
23 class SkWStream; | 23 class SkWStream; |
24 template <typename T> class SkTSet; | 24 template <typename T> class SkTSet; |
25 | 25 |
26 /** \class SkPDFDocument | 26 /** \class SkPDFDocument |
27 | 27 |
28 A SkPDFDocument assembles pages together and generates the final PDF file. | 28 A SkPDFDocument assembles pages together and generates the final PDF file. |
29 */ | 29 */ |
30 class SkPDFDocument { | 30 class SkPDFDocument { |
31 public: | 31 public: |
32 enum Flags { | 32 SK_API SkPDFDocument(); |
33 kNoCompression_Flags = 0x01, //!< DEPRECATED. | |
34 kFavorSpeedOverSize_Flags = 0x01, //!< Don't compress the stream, but | |
35 // if it is already compressed return | |
36 // the compressed stream. | |
37 kNoLinks_Flags = 0x02, //!< do not honor link annotations. | |
38 | |
39 kDraftMode_Flags = 0x01, | |
40 }; | |
41 /** Create a PDF document. | |
42 */ | |
43 explicit SK_API SkPDFDocument(Flags flags = (Flags)0); | |
44 SK_API ~SkPDFDocument(); | 33 SK_API ~SkPDFDocument(); |
45 | 34 |
46 /** Output the PDF to the passed stream. It is an error to call this (it | 35 /** Output the PDF to the passed stream. It is an error to call this (it |
47 * will return false and not modify stream) if no pages have been added | 36 * will return false and not modify stream) if no pages have been added |
48 * or there are pages missing (i.e. page 1 and 3 have been added, but not | 37 * or there are pages missing (i.e. page 1 and 3 have been added, but not |
49 * page 2). | 38 * page 2). |
50 * | 39 * |
51 * @param stream The writable output stream to send the PDF to. | 40 * @param stream The writable output stream to send the PDF to. |
52 */ | 41 */ |
53 SK_API bool emitPDF(SkWStream* stream); | 42 SK_API bool emitPDF(SkWStream* stream); |
(...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
104 size_t headerSize(); | 93 size_t headerSize(); |
105 | 94 |
106 /** Output the PDF footer to the passed stream. | 95 /** Output the PDF footer to the passed stream. |
107 * @param stream The writable output stream to send the footer to. | 96 * @param stream The writable output stream to send the footer to. |
108 * @param objCount The number of objects in the PDF. | 97 * @param objCount The number of objects in the PDF. |
109 */ | 98 */ |
110 void emitFooter(SkWStream* stream, int64_t objCount); | 99 void emitFooter(SkWStream* stream, int64_t objCount); |
111 }; | 100 }; |
112 | 101 |
113 #endif | 102 #endif |
OLD | NEW |