OLD | NEW |
1 // Copyright (c) 2006-2008 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2006-2008 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #include "skia/ext/skia_utils.h" | 5 #include "skia/ext/skia_utils.h" |
6 #include "skia/include/SkColorPriv.h" | 6 #include "SkColorPriv.h" |
7 | |
8 #include "SkGradientShader.h" | 7 #include "SkGradientShader.h" |
9 | 8 |
10 namespace skia { | 9 namespace skia { |
11 | 10 |
12 SkShader* CreateGradientShader(int start_point, | 11 SkShader* CreateGradientShader(int start_point, |
13 int end_point, | 12 int end_point, |
14 SkColor start_color, | 13 SkColor start_color, |
15 SkColor end_color) { | 14 SkColor end_color) { |
16 SkColor grad_colors[2] = { start_color, end_color}; | 15 SkColor grad_colors[2] = { start_color, end_color}; |
17 SkPoint grad_points[2]; | 16 SkPoint grad_points[2]; |
(...skipping 126 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
144 ((shift.l - 0.5) * 2.0); | 143 ((shift.l - 0.5) * 2.0); |
145 } | 144 } |
146 } | 145 } |
147 | 146 |
148 return skia::HSLToSKColor(0xff, hsl); | 147 return skia::HSLToSKColor(0xff, hsl); |
149 } | 148 } |
150 | 149 |
151 | 150 |
152 } // namespace skia | 151 } // namespace skia |
153 | 152 |
OLD | NEW |