| 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 110 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 121 Color fillColor() const { return m_state->m_fillColor; } | 121 Color fillColor() const { return m_state->m_fillColor; } |
| 122 void setFillColor(const Color&); | 122 void setFillColor(const Color&); |
| 123 SkColor effectiveFillColor() const { return m_state->applyAlpha(m_state->m_f
illColor.rgb()); } | 123 SkColor effectiveFillColor() const { return m_state->applyAlpha(m_state->m_f
illColor.rgb()); } |
| 124 | 124 |
| 125 void setFillPattern(PassRefPtr<Pattern>); | 125 void setFillPattern(PassRefPtr<Pattern>); |
| 126 Pattern* fillPattern() const { return m_state->m_fillPattern.get(); } | 126 Pattern* fillPattern() const { return m_state->m_fillPattern.get(); } |
| 127 | 127 |
| 128 void setFillGradient(PassRefPtr<Gradient>); | 128 void setFillGradient(PassRefPtr<Gradient>); |
| 129 Gradient* fillGradient() const { return m_state->m_fillGradient.get(); } | 129 Gradient* fillGradient() const { return m_state->m_fillGradient.get(); } |
| 130 | 130 |
| 131 SkDrawLooper* drawLooper() const { return m_state->m_looper.get(); } | 131 DrawLooper* drawLooper() const { return m_state->m_looper.get(); } |
| 132 SkColor effectiveStrokeColor() const { return m_state->applyAlpha(m_state->m
_strokeData.color().rgb()); } | 132 SkColor effectiveStrokeColor() const { return m_state->applyAlpha(m_state->m
_strokeData.color().rgb()); } |
| 133 | 133 |
| 134 int getNormalizedAlpha() const; | 134 int getNormalizedAlpha() const; |
| 135 | 135 |
| 136 bool getClipBounds(SkRect* bounds) const; | 136 bool getClipBounds(SkRect* bounds) const; |
| 137 const SkMatrix& getTotalMatrix() const; | 137 const SkMatrix& getTotalMatrix() const; |
| 138 bool isPrintingDevice() const; | 138 bool isPrintingDevice() const; |
| 139 | 139 |
| 140 void setShouldAntialias(bool antialias) { m_state->m_shouldAntialias = antia
lias; } | 140 void setShouldAntialias(bool antialias) { m_state->m_shouldAntialias = antia
lias; } |
| 141 bool shouldAntialias() const { return m_state->m_shouldAntialias; } | 141 bool shouldAntialias() const { return m_state->m_shouldAntialias; } |
| (...skipping 154 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 296 void endTransparencyLayer(); | 296 void endTransparencyLayer(); |
| 297 | 297 |
| 298 bool hasShadow() const; | 298 bool hasShadow() const; |
| 299 void setShadow(const FloatSize& offset, float blur, const Color&, | 299 void setShadow(const FloatSize& offset, float blur, const Color&, |
| 300 DrawLooper::ShadowTransformMode = DrawLooper::ShadowRespectsTransforms, | 300 DrawLooper::ShadowTransformMode = DrawLooper::ShadowRespectsTransforms, |
| 301 DrawLooper::ShadowAlphaMode = DrawLooper::ShadowRespectsAlpha); | 301 DrawLooper::ShadowAlphaMode = DrawLooper::ShadowRespectsAlpha); |
| 302 void clearShadow() { clearDrawLooper(); } | 302 void clearShadow() { clearDrawLooper(); } |
| 303 | 303 |
| 304 // It is assumed that this draw looper is used only for shadows | 304 // It is assumed that this draw looper is used only for shadows |
| 305 // (i.e. a draw looper is set if and only if there is a shadow). | 305 // (i.e. a draw looper is set if and only if there is a shadow). |
| 306 void setDrawLooper(const DrawLooper&); | 306 void setDrawLooper(PassRefPtr<DrawLooper>); |
| 307 void clearDrawLooper(); | 307 void clearDrawLooper(); |
| 308 | 308 |
| 309 void drawFocusRing(const Vector<IntRect>&, int width, int offset, const Colo
r&); | 309 void drawFocusRing(const Vector<IntRect>&, int width, int offset, const Colo
r&); |
| 310 void drawFocusRing(const Path&, int width, int offset, const Color&); | 310 void drawFocusRing(const Path&, int width, int offset, const Color&); |
| 311 | 311 |
| 312 enum Edge { | 312 enum Edge { |
| 313 NoEdge = 0, | 313 NoEdge = 0, |
| 314 TopEdge = 1 << 1, | 314 TopEdge = 1 << 1, |
| 315 RightEdge = 1 << 2, | 315 RightEdge = 1 << 2, |
| 316 BottomEdge = 1 << 3, | 316 BottomEdge = 1 << 3, |
| (...skipping 147 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 464 // FIXME: Make this go away: crbug.com/236892 | 464 // FIXME: Make this go away: crbug.com/236892 |
| 465 bool m_updatingControlTints : 1; | 465 bool m_updatingControlTints : 1; |
| 466 bool m_accelerated : 1; | 466 bool m_accelerated : 1; |
| 467 bool m_isCertainlyOpaque : 1; | 467 bool m_isCertainlyOpaque : 1; |
| 468 bool m_printing : 1; | 468 bool m_printing : 1; |
| 469 }; | 469 }; |
| 470 | 470 |
| 471 } // namespace WebCore | 471 } // namespace WebCore |
| 472 | 472 |
| 473 #endif // GraphicsContext_h | 473 #endif // GraphicsContext_h |
| OLD | NEW |