OLD | NEW |
1 | |
2 /* | 1 /* |
3 * Copyright 2010 The Android Open Source Project | 2 * Copyright 2010 The Android Open Source Project |
4 * | 3 * |
5 * Use of this source code is governed by a BSD-style license that can be | 4 * Use of this source code is governed by a BSD-style license that can be |
6 * found in the LICENSE file. | 5 * found in the LICENSE file. |
7 */ | 6 */ |
8 | 7 |
9 | 8 |
10 #ifndef SkPDFGraphicState_DEFINED | 9 #ifndef SkPDFGraphicState_DEFINED |
11 #define SkPDFGraphicState_DEFINED | 10 #define SkPDFGraphicState_DEFINED |
12 | 11 |
13 #include "SkPaint.h" | 12 #include "SkPaint.h" |
14 #include "SkPDFStream.h" | 13 #include "SkPDFStream.h" |
15 #include "SkChecksum.h" | 14 #include "SkChecksum.h" |
16 | 15 |
17 class SkPDFCanon; | 16 class SkPDFCanon; |
18 class SkPDFFormXObject; | 17 class SkPDFFormXObject; |
19 | 18 |
20 /** \class SkPDFGraphicState | 19 /** \class SkPDFGraphicState |
21 SkPaint objects roughly correspond to graphic state dictionaries that can | 20 SkPaint objects roughly correspond to graphic state dictionaries that can |
22 be installed. So that a given dictionary is only output to the pdf file | 21 be installed. So that a given dictionary is only output to the pdf file |
23 once, we want to canonicalize them. | 22 once, we want to canonicalize them. |
24 */ | 23 */ |
25 class SkPDFGraphicState final : public SkPDFObject { | 24 class SkPDFGraphicState final : public SkPDFObject { |
26 | 25 |
27 public: | 26 public: |
28 enum SkPDFSMaskMode { | 27 enum SkPDFSMaskMode { |
29 kAlpha_SMaskMode, | 28 kAlpha_SMaskMode, |
30 kLuminosity_SMaskMode | 29 kLuminosity_SMaskMode |
31 }; | 30 }; |
32 | 31 |
33 // Override emitObject so that we can populate the dictionary on | 32 // Override emitObject so that we can populate the dictionary on |
34 // demand. | 33 // demand. |
35 void emitObject(SkWStream* stream, | 34 void emitObject(SkWStream* stream, |
36 const SkPDFObjNumMap& objNumMap, | 35 const SkPDFObjNumMap& objNumMap, |
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
74 const uint8_t fStrokeCap; // SkPaint::Cap | 73 const uint8_t fStrokeCap; // SkPaint::Cap |
75 const uint8_t fStrokeJoin; // SkPaint::Join | 74 const uint8_t fStrokeJoin; // SkPaint::Join |
76 const uint8_t fMode; // SkXfermode::Mode | 75 const uint8_t fMode; // SkXfermode::Mode |
77 | 76 |
78 SkPDFGraphicState(const SkPaint&); | 77 SkPDFGraphicState(const SkPaint&); |
79 | 78 |
80 typedef SkPDFDict INHERITED; | 79 typedef SkPDFDict INHERITED; |
81 }; | 80 }; |
82 | 81 |
83 #endif | 82 #endif |
OLD | NEW |