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 58 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
69 void incrementSaveCount() { ++m_saveCount; } | 69 void incrementSaveCount() { ++m_saveCount; } |
70 void decrementSaveCount() { --m_saveCount; } | 70 void decrementSaveCount() { --m_saveCount; } |
71 | 71 |
72 // Stroke data | 72 // Stroke data |
73 Color strokeColor() const { return m_strokeColor; } | 73 Color strokeColor() const { return m_strokeColor; } |
74 SkColor effectiveStrokeColor() const { return applyAlpha(m_strokeColor.rgb()
); } | 74 SkColor effectiveStrokeColor() const { return applyAlpha(m_strokeColor.rgb()
); } |
75 void setStrokeColor(const Color&); | 75 void setStrokeColor(const Color&); |
76 | 76 |
77 Gradient* strokeGradient() const { return m_strokeGradient.get(); } | 77 Gradient* strokeGradient() const { return m_strokeGradient.get(); } |
78 void setStrokeGradient(const PassRefPtr<Gradient>, float); | 78 void setStrokeGradient(const PassRefPtr<Gradient>, float); |
79 void clearStrokeGradient(); | |
80 | 79 |
81 Pattern* strokePattern() const { return m_strokePattern.get(); } | 80 Pattern* strokePattern() const { return m_strokePattern.get(); } |
82 void setStrokePattern(const PassRefPtr<Pattern>, float); | 81 void setStrokePattern(const PassRefPtr<Pattern>, float); |
83 void clearStrokePattern(); | |
84 | 82 |
85 const StrokeData& strokeData() const { return m_strokeData; } | 83 const StrokeData& strokeData() const { return m_strokeData; } |
86 void setStrokeStyle(StrokeStyle); | 84 void setStrokeStyle(StrokeStyle); |
87 void setStrokeThickness(float); | 85 void setStrokeThickness(float); |
88 void setLineCap(LineCap); | 86 void setLineCap(LineCap); |
89 void setLineJoin(LineJoin); | 87 void setLineJoin(LineJoin); |
90 void setMiterLimit(float); | 88 void setMiterLimit(float); |
91 void setLineDash(const DashArray&, float); | 89 void setLineDash(const DashArray&, float); |
92 | 90 |
93 // Fill data | 91 // Fill data |
94 Color fillColor() const { return m_fillColor; } | 92 Color fillColor() const { return m_fillColor; } |
95 SkColor effectiveFillColor() const { return applyAlpha(m_fillColor.rgb()); } | 93 SkColor effectiveFillColor() const { return applyAlpha(m_fillColor.rgb()); } |
96 void setFillColor(const Color&); | 94 void setFillColor(const Color&); |
97 | 95 |
98 Gradient* fillGradient() const { return m_fillGradient.get(); } | 96 Gradient* fillGradient() const { return m_fillGradient.get(); } |
99 void setFillGradient(const PassRefPtr<Gradient>, float); | 97 void setFillGradient(const PassRefPtr<Gradient>, float); |
100 void clearFillGradient(); | |
101 | 98 |
102 Pattern* fillPattern() const { return m_fillPattern.get(); } | 99 Pattern* fillPattern() const { return m_fillPattern.get(); } |
103 void setFillPattern(const PassRefPtr<Pattern>, float); | 100 void setFillPattern(const PassRefPtr<Pattern>, float); |
104 void clearFillPattern(); | |
105 | 101 |
106 // Path fill rule | 102 // Path fill rule |
107 WindRule fillRule() const { return m_fillRule; } | 103 WindRule fillRule() const { return m_fillRule; } |
108 void setFillRule(WindRule rule) { m_fillRule = rule; } | 104 void setFillRule(WindRule rule) { m_fillRule = rule; } |
109 | 105 |
110 // Shadow. (This will need tweaking if we use draw loopers for other things.
) | 106 // Shadow. (This will need tweaking if we use draw loopers for other things.
) |
111 SkDrawLooper* drawLooper() const { return m_looper.get(); } | 107 SkDrawLooper* drawLooper() const { return m_looper.get(); } |
112 void setDrawLooper(PassRefPtr<SkDrawLooper>); | 108 void setDrawLooper(PassRefPtr<SkDrawLooper>); |
113 void clearDrawLooper(); | 109 void clearDrawLooper(); |
114 | 110 |
(...skipping 67 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
182 | 178 |
183 uint16_t m_saveCount; | 179 uint16_t m_saveCount; |
184 | 180 |
185 bool m_shouldAntialias : 1; | 181 bool m_shouldAntialias : 1; |
186 bool m_shouldClampToSourceRect : 1; | 182 bool m_shouldClampToSourceRect : 1; |
187 }; | 183 }; |
188 | 184 |
189 } // namespace blink | 185 } // namespace blink |
190 | 186 |
191 #endif // GraphicsContextState_h | 187 #endif // GraphicsContextState_h |
OLD | NEW |