| 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 39 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 50 float r0, | 50 float r0, |
| 51 const FloatPoint& p1, | 51 const FloatPoint& p1, |
| 52 float r1) { | 52 float r1) { |
| 53 return new CanvasGradient(p0, r0, p1, r1); | 53 return new CanvasGradient(p0, r0, p1, r1); |
| 54 } | 54 } |
| 55 | 55 |
| 56 Gradient* getGradient() const { return m_gradient.get(); } | 56 Gradient* getGradient() const { return m_gradient.get(); } |
| 57 | 57 |
| 58 void addColorStop(float value, const String& color, ExceptionState&); | 58 void addColorStop(float value, const String& color, ExceptionState&); |
| 59 | 59 |
| 60 bool isZeroSize() const { return m_isZeroSize; } |
| 61 |
| 60 DEFINE_INLINE_TRACE() {} | 62 DEFINE_INLINE_TRACE() {} |
| 61 | 63 |
| 62 private: | 64 private: |
| 63 CanvasGradient(const FloatPoint& p0, const FloatPoint& p1); | 65 CanvasGradient(const FloatPoint& p0, const FloatPoint& p1); |
| 64 CanvasGradient(const FloatPoint& p0, | 66 CanvasGradient(const FloatPoint& p0, |
| 65 float r0, | 67 float r0, |
| 66 const FloatPoint& p1, | 68 const FloatPoint& p1, |
| 67 float r1); | 69 float r1); |
| 68 | 70 |
| 69 RefPtr<Gradient> m_gradient; | 71 RefPtr<Gradient> m_gradient; |
| 72 const bool m_isZeroSize; |
| 70 }; | 73 }; |
| 71 | 74 |
| 72 } // namespace blink | 75 } // namespace blink |
| 73 | 76 |
| 74 #endif // CanvasGradient_h | 77 #endif // CanvasGradient_h |
| OLD | NEW |