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 SkPDFGraphicState_DEFINED | 10 #ifndef SkPDFGraphicState_DEFINED |
11 #define SkPDFGraphicState_DEFINED | 11 #define SkPDFGraphicState_DEFINED |
12 | 12 |
13 #include "SkPaint.h" | 13 #include "SkPaint.h" |
14 #include "SkPDFTypes.h" | 14 #include "SkPDFTypes.h" |
15 #include "SkTemplates.h" | 15 #include "SkTemplates.h" |
16 #include "SkChecksum.h" | 16 #include "SkChecksum.h" |
17 | 17 |
18 class SkPDFCanon; | 18 class SkPDFCanon; |
19 class SkPDFFormXObject; | 19 class SkPDFFormXObject; |
20 | 20 |
21 /** \class SkPDFGraphicState | 21 /** \class SkPDFGraphicState |
22 SkPaint objects roughly correspond to graphic state dictionaries that can | 22 SkPaint objects roughly correspond to graphic state dictionaries that can |
23 be installed. So that a given dictionary is only output to the pdf file | 23 be installed. So that a given dictionary is only output to the pdf file |
24 once, we want to canonicalize them. | 24 once, we want to canonicalize them. |
25 */ | 25 */ |
26 class SkPDFGraphicState : public SkPDFObject { | 26 class SkPDFGraphicState : public SkPDFObject { |
27 SK_DECLARE_INST_COUNT(SkPDFGraphicState) | 27 |
28 public: | 28 public: |
29 enum SkPDFSMaskMode { | 29 enum SkPDFSMaskMode { |
30 kAlpha_SMaskMode, | 30 kAlpha_SMaskMode, |
31 kLuminosity_SMaskMode | 31 kLuminosity_SMaskMode |
32 }; | 32 }; |
33 | 33 |
34 // Override emitObject so that we can populate the dictionary on | 34 // Override emitObject so that we can populate the dictionary on |
35 // demand. | 35 // demand. |
36 virtual void emitObject(SkWStream* stream, | 36 virtual void emitObject(SkWStream* stream, |
37 const SkPDFObjNumMap& objNumMap, | 37 const SkPDFObjNumMap& objNumMap, |
(...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
82 const uint8_t fStrokeCap; // SkPaint::Cap | 82 const uint8_t fStrokeCap; // SkPaint::Cap |
83 const uint8_t fStrokeJoin; // SkPaint::Join | 83 const uint8_t fStrokeJoin; // SkPaint::Join |
84 const uint8_t fMode; // SkXfermode::Mode | 84 const uint8_t fMode; // SkXfermode::Mode |
85 | 85 |
86 SkPDFGraphicState(const SkPaint&); | 86 SkPDFGraphicState(const SkPaint&); |
87 | 87 |
88 typedef SkPDFDict INHERITED; | 88 typedef SkPDFDict INHERITED; |
89 }; | 89 }; |
90 | 90 |
91 #endif | 91 #endif |
OLD | NEW |