| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2006, 2008 Apple Inc. All rights reserved. | 2 * Copyright (C) 2006, 2008 Apple Inc. All rights reserved. |
| 3 * Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies) | 3 * Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies) |
| 4 * | 4 * |
| 5 * Redistribution and use in source and binary forms, with or without | 5 * Redistribution and use in source and binary forms, with or without |
| 6 * modification, are permitted provided that the following conditions | 6 * modification, are permitted provided that the following conditions |
| 7 * are met: | 7 * are met: |
| 8 * 1. Redistributions of source code must retain the above copyright | 8 * 1. Redistributions of source code must retain the above copyright |
| 9 * notice, this list of conditions and the following disclaimer. | 9 * notice, this list of conditions and the following disclaimer. |
| 10 * 2. Redistributions in binary form must reproduce the above copyright | 10 * 2. Redistributions in binary form must reproduce the above copyright |
| (...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 59 CanvasGradient* canvasGradient() const { return m_gradient.get(); } | 59 CanvasGradient* canvasGradient() const { return m_gradient.get(); } |
| 60 CanvasPattern* canvasPattern() const { return m_pattern.get(); } | 60 CanvasPattern* canvasPattern() const { return m_pattern.get(); } |
| 61 | 61 |
| 62 void applyFillColor(GraphicsContext*); | 62 void applyFillColor(GraphicsContext*); |
| 63 void applyStrokeColor(GraphicsContext*); | 63 void applyStrokeColor(GraphicsContext*); |
| 64 | 64 |
| 65 bool isEquivalentColor(const CanvasStyle&) const; | 65 bool isEquivalentColor(const CanvasStyle&) const; |
| 66 bool isEquivalentRGBA(float r, float g, float b, float a) const; | 66 bool isEquivalentRGBA(float r, float g, float b, float a) const; |
| 67 bool isEquivalentCMYKA(float c, float m, float y, float k, float a) cons
t; | 67 bool isEquivalentCMYKA(float c, float m, float y, float k, float a) cons
t; |
| 68 | 68 |
| 69 void trace(Visitor*); | |
| 70 | |
| 71 private: | 69 private: |
| 72 enum Type { RGBA, CMYKA, Gradient, ImagePattern, CurrentColor, CurrentCo
lorWithOverrideAlpha }; | 70 enum Type { RGBA, CMYKA, Gradient, ImagePattern, CurrentColor, CurrentCo
lorWithOverrideAlpha }; |
| 73 | 71 |
| 74 CanvasStyle(Type, float overrideAlpha = 0); | 72 CanvasStyle(Type, float overrideAlpha = 0); |
| 75 CanvasStyle(RGBA32 rgba); | 73 CanvasStyle(RGBA32 rgba); |
| 76 CanvasStyle(float grayLevel, float alpha); | 74 CanvasStyle(float grayLevel, float alpha); |
| 77 CanvasStyle(float r, float g, float b, float a); | 75 CanvasStyle(float r, float g, float b, float a); |
| 78 CanvasStyle(float c, float m, float y, float k, float a); | 76 CanvasStyle(float c, float m, float y, float k, float a); |
| 79 CanvasStyle(PassRefPtr<CanvasGradient>); | 77 CanvasStyle(PassRefPtr<CanvasGradient>); |
| 80 CanvasStyle(PassRefPtr<CanvasPattern>); | 78 CanvasStyle(PassRefPtr<CanvasPattern>); |
| (...skipping 18 matching lines...) Expand all Loading... |
| 99 float a; | 97 float a; |
| 100 } m_cmyka; | 98 } m_cmyka; |
| 101 }; | 99 }; |
| 102 | 100 |
| 103 RGBA32 currentColor(HTMLCanvasElement*); | 101 RGBA32 currentColor(HTMLCanvasElement*); |
| 104 bool parseColorOrCurrentColor(RGBA32& parsedColor, const String& colorString
, HTMLCanvasElement*); | 102 bool parseColorOrCurrentColor(RGBA32& parsedColor, const String& colorString
, HTMLCanvasElement*); |
| 105 | 103 |
| 106 } // namespace blink | 104 } // namespace blink |
| 107 | 105 |
| 108 #endif | 106 #endif |
| OLD | NEW |