| 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 22 matching lines...) Expand all Loading... |
| 33 #include "wtf/RefCounted.h" | 33 #include "wtf/RefCounted.h" |
| 34 #include "wtf/text/WTFString.h" | 34 #include "wtf/text/WTFString.h" |
| 35 | 35 |
| 36 namespace blink { | 36 namespace blink { |
| 37 | 37 |
| 38 class CanvasGradient; | 38 class CanvasGradient; |
| 39 class CanvasPattern; | 39 class CanvasPattern; |
| 40 class GraphicsContext; | 40 class GraphicsContext; |
| 41 class HTMLCanvasElement; | 41 class HTMLCanvasElement; |
| 42 | 42 |
| 43 class CanvasStyle FINAL : public RefCountedWillBeGarbageCollected<CanvasStyl
e> { | 43 class CanvasStyle final : public RefCountedWillBeGarbageCollected<CanvasStyl
e> { |
| 44 public: | 44 public: |
| 45 static PassRefPtrWillBeRawPtr<CanvasStyle> createFromRGBA(RGBA32 rgba) {
return adoptRefWillBeNoop(new CanvasStyle(rgba)); } | 45 static PassRefPtrWillBeRawPtr<CanvasStyle> createFromRGBA(RGBA32 rgba) {
return adoptRefWillBeNoop(new CanvasStyle(rgba)); } |
| 46 static PassRefPtrWillBeRawPtr<CanvasStyle> createFromString(const String
& color); | 46 static PassRefPtrWillBeRawPtr<CanvasStyle> createFromString(const String
& color); |
| 47 static PassRefPtrWillBeRawPtr<CanvasStyle> createFromStringWithOverrideA
lpha(const String& color, float alpha); | 47 static PassRefPtrWillBeRawPtr<CanvasStyle> createFromStringWithOverrideA
lpha(const String& color, float alpha); |
| 48 static PassRefPtrWillBeRawPtr<CanvasStyle> createFromGrayLevelWithAlpha(
float grayLevel, float alpha) { return adoptRefWillBeNoop(new CanvasStyle(grayLe
vel, alpha)); } | 48 static PassRefPtrWillBeRawPtr<CanvasStyle> createFromGrayLevelWithAlpha(
float grayLevel, float alpha) { return adoptRefWillBeNoop(new CanvasStyle(grayLe
vel, alpha)); } |
| 49 static PassRefPtrWillBeRawPtr<CanvasStyle> createFromRGBAChannels(float
r, float g, float b, float a) { return adoptRefWillBeNoop(new CanvasStyle(r, g,
b, a)); } | 49 static PassRefPtrWillBeRawPtr<CanvasStyle> createFromRGBAChannels(float
r, float g, float b, float a) { return adoptRefWillBeNoop(new CanvasStyle(r, g,
b, a)); } |
| 50 static PassRefPtrWillBeRawPtr<CanvasStyle> createFromCMYKAChannels(float
c, float m, float y, float k, float a) { return adoptRefWillBeNoop(new CanvasSt
yle(c, m, y, k, a)); } | 50 static PassRefPtrWillBeRawPtr<CanvasStyle> createFromCMYKAChannels(float
c, float m, float y, float k, float a) { return adoptRefWillBeNoop(new CanvasSt
yle(c, m, y, k, a)); } |
| 51 static PassRefPtrWillBeRawPtr<CanvasStyle> createFromGradient(PassRefPtr
WillBeRawPtr<CanvasGradient>); | 51 static PassRefPtrWillBeRawPtr<CanvasStyle> createFromGradient(PassRefPtr
WillBeRawPtr<CanvasGradient>); |
| 52 static PassRefPtrWillBeRawPtr<CanvasStyle> createFromPattern(PassRefPtrW
illBeRawPtr<CanvasPattern>); | 52 static PassRefPtrWillBeRawPtr<CanvasStyle> createFromPattern(PassRefPtrW
illBeRawPtr<CanvasPattern>); |
| 53 | 53 |
| (...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 99 float a; | 99 float a; |
| 100 } m_cmyka; | 100 } m_cmyka; |
| 101 }; | 101 }; |
| 102 | 102 |
| 103 RGBA32 currentColor(HTMLCanvasElement*); | 103 RGBA32 currentColor(HTMLCanvasElement*); |
| 104 bool parseColorOrCurrentColor(RGBA32& parsedColor, const String& colorString
, HTMLCanvasElement*); | 104 bool parseColorOrCurrentColor(RGBA32& parsedColor, const String& colorString
, HTMLCanvasElement*); |
| 105 | 105 |
| 106 } // namespace blink | 106 } // namespace blink |
| 107 | 107 |
| 108 #endif | 108 #endif |
| OLD | NEW |