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 SkPDFPage_DEFINED | 10 #ifndef SkPDFPage_DEFINED |
11 #define SkPDFPage_DEFINED | 11 #define SkPDFPage_DEFINED |
12 | 12 |
13 #include "SkPDFTypes.h" | 13 #include "SkPDFTypes.h" |
14 #include "SkPDFStream.h" | 14 #include "SkPDFStream.h" |
15 #include "SkRefCnt.h" | 15 #include "SkRefCnt.h" |
16 #include "SkTDArray.h" | 16 #include "SkTDArray.h" |
17 | 17 |
18 class SkPDFCatalog; | 18 class SkPDFCatalog; |
19 class SkPDFDevice; | 19 class SkPDFDevice; |
20 class SkWStream; | 20 class SkWStream; |
21 | 21 |
22 /** \class SkPDFPage | 22 /** \class SkPDFPage |
23 | 23 |
24 A SkPDFPage contains meta information about a page, is used in the page | 24 A SkPDFPage contains meta information about a page, is used in the page |
25 tree and points to the content of the page. | 25 tree and points to the content of the page. |
26 */ | 26 */ |
27 class SkPDFPage : public SkPDFDict { | 27 class SkPDFPage : public SkPDFDict { |
| 28 SK_DECLARE_INST_COUNT(SkPDFPage) |
28 public: | 29 public: |
29 /** Create a PDF page with the passed PDF device. The device need not | 30 /** Create a PDF page with the passed PDF device. The device need not |
30 * have content on it yet. | 31 * have content on it yet. |
31 * @param content The page content. | 32 * @param content The page content. |
32 */ | 33 */ |
33 explicit SkPDFPage(SkPDFDevice* content); | 34 explicit SkPDFPage(SkPDFDevice* content); |
34 ~SkPDFPage(); | 35 ~SkPDFPage(); |
35 | 36 |
36 /** Before a page and its contents can be sized and emitted, it must | 37 /** Before a page and its contents can be sized and emitted, it must |
37 * be finalized. No changes to the PDFDevice will be honored after | 38 * be finalized. No changes to the PDFDevice will be honored after |
(...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
95 * that shows on this page. | 96 * that shows on this page. |
96 */ | 97 */ |
97 const SkPDFGlyphSetMap& getFontGlyphUsage() const; | 98 const SkPDFGlyphSetMap& getFontGlyphUsage() const; |
98 | 99 |
99 private: | 100 private: |
100 // Multiple pages may reference the content. | 101 // Multiple pages may reference the content. |
101 SkAutoTUnref<SkPDFDevice> fDevice; | 102 SkAutoTUnref<SkPDFDevice> fDevice; |
102 | 103 |
103 // Once the content is finalized, put it into a stream for output. | 104 // Once the content is finalized, put it into a stream for output. |
104 SkAutoTUnref<SkPDFStream> fContentStream; | 105 SkAutoTUnref<SkPDFStream> fContentStream; |
| 106 typedef SkPDFDict INHERITED; |
105 }; | 107 }; |
106 | 108 |
107 #endif | 109 #endif |
OLD | NEW |