| 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 |
| (...skipping 15 matching lines...) Expand all Loading... |
| 26 class SkPDFGraphicState : public SkPDFObject { | 26 class SkPDFGraphicState : public SkPDFObject { |
| 27 | 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 void emitObject(SkWStream* stream, |
| 37 const SkPDFObjNumMap& objNumMap, | 37 const SkPDFObjNumMap& objNumMap, |
| 38 const SkPDFSubstituteMap& substitutes); | 38 const SkPDFSubstituteMap& substitutes) const override; |
| 39 | 39 |
| 40 /** Get the graphic state for the passed SkPaint. The reference count of | 40 /** Get the graphic state for the passed SkPaint. The reference count of |
| 41 * the object is incremented and it is the caller's responsibility to | 41 * the object is incremented and it is the caller's responsibility to |
| 42 * unreference it when done. This is needed to accommodate the weak | 42 * unreference it when done. This is needed to accommodate the weak |
| 43 * reference pattern used when the returned object is new and has no | 43 * reference pattern used when the returned object is new and has no |
| 44 * other references. | 44 * other references. |
| 45 * @param paint The SkPaint to emulate. | 45 * @param paint The SkPaint to emulate. |
| 46 */ | 46 */ |
| 47 static SkPDFGraphicState* GetGraphicStateForPaint(SkPDFCanon* canon, | 47 static SkPDFGraphicState* GetGraphicStateForPaint(SkPDFCanon* canon, |
| 48 const SkPaint& paint); | 48 const SkPaint& paint); |
| (...skipping 33 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 |