OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2006, 2007, 2008 Apple Computer, Inc. All rights reserved. | 2 * Copyright (C) 2006, 2007, 2008 Apple Computer, Inc. All rights reserved. |
3 * Copyright (C) 2007 Alp Toker <alp@atoker.com> | 3 * Copyright (C) 2007 Alp Toker <alp@atoker.com> |
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 10 matching lines...) Expand all Loading... |
21 * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY | 21 * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY |
22 * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT | 22 * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT |
23 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE | 23 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE |
24 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | 24 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
25 */ | 25 */ |
26 | 26 |
27 #include "config.h" | 27 #include "config.h" |
28 #include "Gradient.h" | 28 #include "Gradient.h" |
29 | 29 |
30 #include "CSSParser.h" | 30 #include "CSSParser.h" |
31 #include "NotImplemented.h" | 31 #include "GraphicsContext.h" |
32 | 32 |
33 #include <QGradient> | 33 #include <QGradient> |
| 34 #include <QPainter> |
34 | 35 |
35 namespace WebCore { | 36 namespace WebCore { |
36 | 37 |
37 void Gradient::platformDestroy() | 38 void Gradient::platformDestroy() |
38 { | 39 { |
39 delete m_gradient; | 40 delete m_gradient; |
40 m_gradient = 0; | 41 m_gradient = 0; |
41 } | 42 } |
42 | 43 |
43 QGradient* Gradient::platformGradient() | 44 QGradient* Gradient::platformGradient() |
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
76 case SpreadMethodRepeat: | 77 case SpreadMethodRepeat: |
77 m_gradient->setSpread(QGradient::RepeatSpread); | 78 m_gradient->setSpread(QGradient::RepeatSpread); |
78 break; | 79 break; |
79 } | 80 } |
80 | 81 |
81 return m_gradient; | 82 return m_gradient; |
82 } | 83 } |
83 | 84 |
84 void Gradient::fill(GraphicsContext* context, const FloatRect& rect) | 85 void Gradient::fill(GraphicsContext* context, const FloatRect& rect) |
85 { | 86 { |
86 notImplemented(); | 87 context->platformContext()->fillRect(rect, *platformGradient()); |
87 } | 88 } |
88 | 89 |
89 } //namespace | 90 } //namespace |
OLD | NEW |