OLD | NEW |
1 | 1 |
2 /* | 2 /* |
3 * Copyright 2010 Google Inc. | 3 * Copyright 2010 Google Inc. |
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 SkPDFStream_DEFINED | 10 #ifndef SkPDFStream_DEFINED |
(...skipping 22 matching lines...) Expand all Loading... |
33 | 33 |
34 /** Create a PDF stream. A Length entry is automatically added to the | 34 /** Create a PDF stream. A Length entry is automatically added to the |
35 * stream dictionary. | 35 * stream dictionary. |
36 * @param stream The data part of the stream. Will be duplicate()d. | 36 * @param stream The data part of the stream. Will be duplicate()d. |
37 */ | 37 */ |
38 explicit SkPDFStream(SkStream* stream); | 38 explicit SkPDFStream(SkStream* stream); |
39 | 39 |
40 virtual ~SkPDFStream(); | 40 virtual ~SkPDFStream(); |
41 | 41 |
42 // The SkPDFObject interface. | 42 // The SkPDFObject interface. |
43 virtual void emitObject(SkWStream* stream, | 43 void emitObject(SkWStream* stream, |
44 const SkPDFObjNumMap& objNumMap, | 44 const SkPDFObjNumMap& objNumMap, |
45 const SkPDFSubstituteMap& substitutes) override; | 45 const SkPDFSubstituteMap& substitutes) override; |
46 | 46 |
47 protected: | 47 protected: |
48 enum State { | 48 enum State { |
49 kUnused_State, //!< The stream hasn't been requested yet. | 49 kUnused_State, //!< The stream hasn't been requested yet. |
50 kNoCompression_State, //!< The stream's been requested in an | 50 kNoCompression_State, //!< The stream's been requested in an |
51 // uncompressed form. | 51 // uncompressed form. |
52 kCompressed_State, //!< The stream's already been compressed. | 52 kCompressed_State, //!< The stream's already been compressed. |
53 }; | 53 }; |
54 | 54 |
55 /* Create a PDF stream with no data. The setData method must be called to | 55 /* Create a PDF stream with no data. The setData method must be called to |
(...skipping 13 matching lines...) Expand all Loading... |
69 private: | 69 private: |
70 // Indicates what form (or if) the stream has been requested. | 70 // Indicates what form (or if) the stream has been requested. |
71 State fState; | 71 State fState; |
72 | 72 |
73 SkAutoTDelete<SkStreamRewindable> fDataStream; | 73 SkAutoTDelete<SkStreamRewindable> fDataStream; |
74 | 74 |
75 typedef SkPDFDict INHERITED; | 75 typedef SkPDFDict INHERITED; |
76 }; | 76 }; |
77 | 77 |
78 #endif | 78 #endif |
OLD | NEW |