OLD | NEW |
1 // Copyright (C) 2013 Google Inc. All rights reserved. | 1 // Copyright (C) 2013 Google Inc. All rights reserved. |
2 // | 2 // |
3 // Redistribution and use in source and binary forms, with or without | 3 // Redistribution and use in source and binary forms, with or without |
4 // modification, are permitted provided that the following conditions are | 4 // modification, are permitted provided that the following conditions are |
5 // met: | 5 // met: |
6 // | 6 // |
7 // * Redistributions of source code must retain the above copyright | 7 // * Redistributions of source code must retain the above copyright |
8 // notice, this list of conditions and the following disclaimer. | 8 // notice, this list of conditions and the following disclaimer. |
9 // * Redistributions in binary form must reproduce the above | 9 // * Redistributions in binary form must reproduce the above |
10 // copyright notice, this list of conditions and the following disclaimer | 10 // copyright notice, this list of conditions and the following disclaimer |
(...skipping 81 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
92 Color fillColor() const { return m_fillColor; } | 92 Color fillColor() const { return m_fillColor; } |
93 SkColor effectiveFillColor() const { return applyAlpha(m_fillColor.rgb()); } | 93 SkColor effectiveFillColor() const { return applyAlpha(m_fillColor.rgb()); } |
94 void setFillColor(const Color&); | 94 void setFillColor(const Color&); |
95 | 95 |
96 Gradient* fillGradient() const { return m_fillGradient.get(); } | 96 Gradient* fillGradient() const { return m_fillGradient.get(); } |
97 void setFillGradient(const PassRefPtr<Gradient>, float); | 97 void setFillGradient(const PassRefPtr<Gradient>, float); |
98 | 98 |
99 Pattern* fillPattern() const { return m_fillPattern.get(); } | 99 Pattern* fillPattern() const { return m_fillPattern.get(); } |
100 void setFillPattern(const PassRefPtr<Pattern>, float); | 100 void setFillPattern(const PassRefPtr<Pattern>, float); |
101 | 101 |
102 // Path fill rule | |
103 WindRule fillRule() const { return m_fillRule; } | |
104 void setFillRule(WindRule rule) { m_fillRule = rule; } | |
105 | |
106 // Shadow. (This will need tweaking if we use draw loopers for other things.
) | 102 // Shadow. (This will need tweaking if we use draw loopers for other things.
) |
107 SkDrawLooper* drawLooper() const { return m_looper.get(); } | 103 SkDrawLooper* drawLooper() const { return m_looper.get(); } |
108 void setDrawLooper(PassRefPtr<SkDrawLooper>); | 104 void setDrawLooper(PassRefPtr<SkDrawLooper>); |
109 void clearDrawLooper(); | 105 void clearDrawLooper(); |
110 | 106 |
111 SkImageFilter* dropShadowImageFilter() const { return m_dropShadowImageFilte
r.get(); } | 107 SkImageFilter* dropShadowImageFilter() const { return m_dropShadowImageFilte
r.get(); } |
112 void setDropShadowImageFilter(PassRefPtr<SkImageFilter>); | 108 void setDropShadowImageFilter(PassRefPtr<SkImageFilter>); |
113 void clearDropShadowImageFilter(); | 109 void clearDropShadowImageFilter(); |
114 | 110 |
115 // Text. (See TextModeFill & friends.) | 111 // Text. (See TextModeFill & friends.) |
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
153 mutable SkPaint m_strokePaint; | 149 mutable SkPaint m_strokePaint; |
154 mutable SkPaint m_fillPaint; | 150 mutable SkPaint m_fillPaint; |
155 | 151 |
156 StrokeData m_strokeData; | 152 StrokeData m_strokeData; |
157 | 153 |
158 Color m_strokeColor; | 154 Color m_strokeColor; |
159 RefPtr<Gradient> m_strokeGradient; | 155 RefPtr<Gradient> m_strokeGradient; |
160 RefPtr<Pattern> m_strokePattern; | 156 RefPtr<Pattern> m_strokePattern; |
161 | 157 |
162 Color m_fillColor; | 158 Color m_fillColor; |
163 WindRule m_fillRule; | |
164 RefPtr<Gradient> m_fillGradient; | 159 RefPtr<Gradient> m_fillGradient; |
165 RefPtr<Pattern> m_fillPattern; | 160 RefPtr<Pattern> m_fillPattern; |
166 | 161 |
167 RefPtr<SkDrawLooper> m_looper; | 162 RefPtr<SkDrawLooper> m_looper; |
168 RefPtr<SkImageFilter> m_dropShadowImageFilter; | 163 RefPtr<SkImageFilter> m_dropShadowImageFilter; |
169 | 164 |
170 TextDrawingModeFlags m_textDrawingMode; | 165 TextDrawingModeFlags m_textDrawingMode; |
171 | 166 |
172 int m_alpha; | 167 int m_alpha; |
173 RefPtr<SkColorFilter> m_colorFilter; | 168 RefPtr<SkColorFilter> m_colorFilter; |
174 | 169 |
175 SkXfermode::Mode m_compositeOperation; | 170 SkXfermode::Mode m_compositeOperation; |
176 | 171 |
177 InterpolationQuality m_interpolationQuality; | 172 InterpolationQuality m_interpolationQuality; |
178 | 173 |
179 uint16_t m_saveCount; | 174 uint16_t m_saveCount; |
180 | 175 |
181 bool m_shouldAntialias : 1; | 176 bool m_shouldAntialias : 1; |
182 bool m_shouldClampToSourceRect : 1; | 177 bool m_shouldClampToSourceRect : 1; |
183 }; | 178 }; |
184 | 179 |
185 } // namespace blink | 180 } // namespace blink |
186 | 181 |
187 #endif // GraphicsContextState_h | 182 #endif // GraphicsContextState_h |
OLD | NEW |