| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2006, 2007, 2008, 2011 Apple Inc. All rights reserved. | 2 * Copyright (C) 2006, 2007, 2008, 2011 Apple Inc. All rights reserved. |
| 3 * Copyright (C) 2007 Alp Toker <alp@atoker.com> | 3 * Copyright (C) 2007 Alp Toker <alp@atoker.com> |
| 4 * Copyright (C) 2008 Torch Mobile, Inc. | 4 * Copyright (C) 2008 Torch Mobile, Inc. |
| 5 * Copyright (C) 2013 Google Inc. All rights reserved. | 5 * Copyright (C) 2013 Google Inc. All rights reserved. |
| 6 * | 6 * |
| 7 * Redistribution and use in source and binary forms, with or without | 7 * Redistribution and use in source and binary forms, with or without |
| 8 * modification, are permitted provided that the following conditions | 8 * modification, are permitted provided that the following conditions |
| 9 * are met: | 9 * are met: |
| 10 * 1. Redistributions of source code must retain the above copyright | 10 * 1. Redistributions of source code must retain the above copyright |
| (...skipping 108 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 119 | 119 |
| 120 void setSpreadMethod(GradientSpreadMethod); | 120 void setSpreadMethod(GradientSpreadMethod); |
| 121 GradientSpreadMethod spreadMethod() const { return m_spreadMethod; } | 121 GradientSpreadMethod spreadMethod() const { return m_spreadMethod; } |
| 122 void setGradientSpaceTransform(const AffineTransform& gradientSpaceTransform
ation); | 122 void setGradientSpaceTransform(const AffineTransform& gradientSpaceTransform
ation); |
| 123 AffineTransform gradientSpaceTransform() { return m_gradientSpaceTransformat
ion; } | 123 AffineTransform gradientSpaceTransform() { return m_gradientSpaceTransformat
ion; } |
| 124 | 124 |
| 125 private: | 125 private: |
| 126 Gradient(const FloatPoint& p0, const FloatPoint& p1); | 126 Gradient(const FloatPoint& p0, const FloatPoint& p1); |
| 127 Gradient(const FloatPoint& p0, float r0, const FloatPoint& p1, float r1, flo
at aspectRatio); | 127 Gradient(const FloatPoint& p0, float r0, const FloatPoint& p1, float r1, flo
at aspectRatio); |
| 128 | 128 |
| 129 PassRefPtr<SkShader> refShader(); | 129 SkShader* shader(); |
| 130 void destroyShader(); | 130 void destroyShader(); |
| 131 | 131 |
| 132 void sortStopsIfNecessary(); | 132 void sortStopsIfNecessary(); |
| 133 | 133 |
| 134 FloatPoint m_p0; | 134 FloatPoint m_p0; |
| 135 FloatPoint m_p1; | 135 FloatPoint m_p1; |
| 136 float m_r0; | 136 float m_r0; |
| 137 float m_r1; | 137 float m_r1; |
| 138 float m_aspectRatio; // For elliptical gradient, width / height. | 138 float m_aspectRatio; // For elliptical gradient, width / height. |
| 139 Vector<ColorStop, 2> m_stops; | 139 Vector<ColorStop, 2> m_stops; |
| 140 bool m_radial; | 140 bool m_radial; |
| 141 bool m_stopsSorted; | 141 bool m_stopsSorted; |
| 142 bool m_drawInPMColorSpace; | 142 bool m_drawInPMColorSpace; |
| 143 GradientSpreadMethod m_spreadMethod; | 143 GradientSpreadMethod m_spreadMethod; |
| 144 AffineTransform m_gradientSpaceTransformation; | 144 AffineTransform m_gradientSpaceTransformation; |
| 145 | 145 |
| 146 RefPtr<SkShader> m_gradient; | 146 RefPtr<SkShader> m_gradient; |
| 147 }; | 147 }; |
| 148 | 148 |
| 149 } // namespace blink | 149 } // namespace blink |
| 150 | 150 |
| 151 #endif | 151 #endif |
| OLD | NEW |