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 35 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
46 * other references. | 46 * other references. |
47 * @param paint The SkPaint to emulate. | 47 * @param paint The SkPaint to emulate. |
48 */ | 48 */ |
49 static SkPDFGraphicState* GetGraphicStateForPaint(const SkPaint& paint); | 49 static SkPDFGraphicState* GetGraphicStateForPaint(const SkPaint& paint); |
50 | 50 |
51 /** Make a graphic state that only sets the passed soft mask. The | 51 /** Make a graphic state that only sets the passed soft mask. The |
52 * reference count of the object is incremented and it is the caller's | 52 * reference count of the object is incremented and it is the caller's |
53 * responsibility to unreference it when done. | 53 * responsibility to unreference it when done. |
54 * @param sMask The form xobject to use as a soft mask. | 54 * @param sMask The form xobject to use as a soft mask. |
55 * @param invert Indicates if the alpha of the sMask should be inverted. | 55 * @param invert Indicates if the alpha of the sMask should be inverted. |
56 * @param alpha True to use alpha for the sMask, otherwise luminosity. | |
vandebo (ex-Chrome)
2013/07/03 17:07:01
Contrary to what you might see here, we prefer enu
ducky
2013/07/03 23:32:09
Done.
Does it make sense to turn the other bool p
| |
56 */ | 57 */ |
57 static SkPDFGraphicState* GetSMaskGraphicState(SkPDFFormXObject* sMask, | 58 static SkPDFGraphicState* GetSMaskGraphicState(SkPDFFormXObject* sMask, |
58 bool invert); | 59 bool invert, bool alpha); |
59 | 60 |
60 /** Get a graphic state that only unsets the soft mask. The reference | 61 /** Get a graphic state that only unsets the soft mask. The reference |
61 * count of the object is incremented and it is the caller's responsibility | 62 * count of the object is incremented and it is the caller's responsibility |
62 * to unreference it when done. This is needed to accommodate the weak | 63 * to unreference it when done. This is needed to accommodate the weak |
63 * reference pattern used when the returned object is new and has no | 64 * reference pattern used when the returned object is new and has no |
64 * other references. | 65 * other references. |
65 */ | 66 */ |
66 static SkPDFGraphicState* GetNoSMaskGraphicState(); | 67 static SkPDFGraphicState* GetNoSMaskGraphicState(); |
67 | 68 |
68 private: | 69 private: |
(...skipping 24 matching lines...) Expand all Loading... | |
93 explicit SkPDFGraphicState(const SkPaint& paint); | 94 explicit SkPDFGraphicState(const SkPaint& paint); |
94 | 95 |
95 void populateDict(); | 96 void populateDict(); |
96 | 97 |
97 static SkPDFObject* GetInvertFunction(); | 98 static SkPDFObject* GetInvertFunction(); |
98 | 99 |
99 static int Find(const SkPaint& paint); | 100 static int Find(const SkPaint& paint); |
100 }; | 101 }; |
101 | 102 |
102 #endif | 103 #endif |
OLD | NEW |