OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2003, 2006, 2007, 2008, 2009 Apple Inc. All rights reserved. | 2 * Copyright (C) 2003, 2006, 2007, 2008, 2009 Apple Inc. All rights reserved. |
3 * Copyright (C) 2008-2009 Torch Mobile, Inc. | 3 * Copyright (C) 2008-2009 Torch Mobile, Inc. |
4 * Copyright (C) 2013 Google Inc. All rights reserved. | 4 * Copyright (C) 2013 Google Inc. All rights reserved. |
5 * | 5 * |
6 * Redistribution and use in source and binary forms, with or without | 6 * Redistribution and use in source and binary forms, with or without |
7 * modification, are permitted provided that the following conditions | 7 * modification, are permitted provided that the following conditions |
8 * are met: | 8 * are met: |
9 * 1. Redistributions of source code must retain the above copyright | 9 * 1. Redistributions of source code must retain the above copyright |
10 * notice, this list of conditions and the following disclaimer. | 10 * notice, this list of conditions and the following disclaimer. |
(...skipping 111 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
122 Color fillColor() const { return m_state->m_fillColor; } | 122 Color fillColor() const { return m_state->m_fillColor; } |
123 void setFillColor(const Color&); | 123 void setFillColor(const Color&); |
124 SkColor effectiveFillColor() const { return m_state->applyAlpha(m_state->m_f
illColor.rgb()); } | 124 SkColor effectiveFillColor() const { return m_state->applyAlpha(m_state->m_f
illColor.rgb()); } |
125 | 125 |
126 void setFillPattern(PassRefPtr<Pattern>); | 126 void setFillPattern(PassRefPtr<Pattern>); |
127 Pattern* fillPattern() const { return m_state->m_fillPattern.get(); } | 127 Pattern* fillPattern() const { return m_state->m_fillPattern.get(); } |
128 | 128 |
129 void setFillGradient(PassRefPtr<Gradient>); | 129 void setFillGradient(PassRefPtr<Gradient>); |
130 Gradient* fillGradient() const { return m_state->m_fillGradient.get(); } | 130 Gradient* fillGradient() const { return m_state->m_fillGradient.get(); } |
131 | 131 |
132 SkDrawLooper* drawLooper() const { return m_state->m_looper.get(); } | 132 DrawLooper* drawLooper() const { return m_state->m_looper.get(); } |
133 SkColor effectiveStrokeColor() const { return m_state->applyAlpha(m_state->m
_strokeData.color().rgb()); } | 133 SkColor effectiveStrokeColor() const { return m_state->applyAlpha(m_state->m
_strokeData.color().rgb()); } |
134 | 134 |
135 int getNormalizedAlpha() const; | 135 int getNormalizedAlpha() const; |
136 | 136 |
137 bool getClipBounds(SkRect* bounds) const; | 137 bool getClipBounds(SkRect* bounds) const; |
138 const SkMatrix& getTotalMatrix() const; | 138 const SkMatrix& getTotalMatrix() const; |
139 bool isPrintingDevice() const; | 139 bool isPrintingDevice() const; |
140 | 140 |
141 void setShouldAntialias(bool antialias) { m_state->m_shouldAntialias = antia
lias; } | 141 void setShouldAntialias(bool antialias) { m_state->m_shouldAntialias = antia
lias; } |
142 bool shouldAntialias() const { return m_state->m_shouldAntialias; } | 142 bool shouldAntialias() const { return m_state->m_shouldAntialias; } |
(...skipping 154 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
297 void endTransparencyLayer(); | 297 void endTransparencyLayer(); |
298 | 298 |
299 bool hasShadow() const; | 299 bool hasShadow() const; |
300 void setShadow(const FloatSize& offset, float blur, const Color&, | 300 void setShadow(const FloatSize& offset, float blur, const Color&, |
301 DrawLooper::ShadowTransformMode = DrawLooper::ShadowRespectsTransforms, | 301 DrawLooper::ShadowTransformMode = DrawLooper::ShadowRespectsTransforms, |
302 DrawLooper::ShadowAlphaMode = DrawLooper::ShadowRespectsAlpha); | 302 DrawLooper::ShadowAlphaMode = DrawLooper::ShadowRespectsAlpha); |
303 void clearShadow() { clearDrawLooper(); } | 303 void clearShadow() { clearDrawLooper(); } |
304 | 304 |
305 // It is assumed that this draw looper is used only for shadows | 305 // It is assumed that this draw looper is used only for shadows |
306 // (i.e. a draw looper is set if and only if there is a shadow). | 306 // (i.e. a draw looper is set if and only if there is a shadow). |
307 void setDrawLooper(const DrawLooper&); | 307 void setDrawLooper(PassRefPtr<DrawLooper>); |
308 void clearDrawLooper(); | 308 void clearDrawLooper(); |
309 | 309 |
310 void drawFocusRing(const Vector<IntRect>&, int width, int offset, const Colo
r&); | 310 void drawFocusRing(const Vector<IntRect>&, int width, int offset, const Colo
r&); |
311 void drawFocusRing(const Path&, int width, int offset, const Color&); | 311 void drawFocusRing(const Path&, int width, int offset, const Color&); |
312 | 312 |
313 enum Edge { | 313 enum Edge { |
314 NoEdge = 0, | 314 NoEdge = 0, |
315 TopEdge = 1 << 1, | 315 TopEdge = 1 << 1, |
316 RightEdge = 1 << 2, | 316 RightEdge = 1 << 2, |
317 BottomEdge = 1 << 3, | 317 BottomEdge = 1 << 3, |
(...skipping 147 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
465 // FIXME: Make this go away: crbug.com/236892 | 465 // FIXME: Make this go away: crbug.com/236892 |
466 bool m_updatingControlTints : 1; | 466 bool m_updatingControlTints : 1; |
467 bool m_accelerated : 1; | 467 bool m_accelerated : 1; |
468 bool m_isCertainlyOpaque : 1; | 468 bool m_isCertainlyOpaque : 1; |
469 bool m_printing : 1; | 469 bool m_printing : 1; |
470 }; | 470 }; |
471 | 471 |
472 } // namespace WebCore | 472 } // namespace WebCore |
473 | 473 |
474 #endif // GraphicsContext_h | 474 #endif // GraphicsContext_h |
OLD | NEW |