Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(954)

Side by Side Diff: skia/ext/skia_utils.h

Issue 79082: Add bitmap manipulation functions in advance of themes. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: '' Created 11 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
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 #ifndef SKIA_EXT_SKIA_UTILS_H_ 5 #ifndef SKIA_EXT_SKIA_UTILS_H_
6 #define SKIA_EXT_SKIA_UTILS_H_ 6 #define SKIA_EXT_SKIA_UTILS_H_
7 7
8 #include "SkColor.h" 8 #include "SkColor.h"
9 #include "SkShader.h" 9 #include "SkShader.h"
10 10
11 namespace skia { 11 namespace skia {
12 12
13 // Creates a vertical gradient shader. The caller owns the shader. 13 // Creates a vertical gradient shader. The caller owns the shader.
14 // Example usage to avoid leaks: 14 // Example usage to avoid leaks:
15 // paint.setShader(gfx::CreateGradientShader(0, 10, red, blue))->safeUnref(); 15 // paint.setShader(gfx::CreateGradientShader(0, 10, red, blue))->safeUnref();
16 // 16 //
17 // (The old shader in the paint, if any, needs to be freed, and safeUnref will 17 // (The old shader in the paint, if any, needs to be freed, and safeUnref will
18 // handle the NULL case.) 18 // handle the NULL case.)
19 SkShader* CreateGradientShader(int start_point, 19 SkShader* CreateGradientShader(int start_point,
20 int end_point, 20 int end_point,
21 SkColor start_color, 21 SkColor start_color,
22 SkColor end_color); 22 SkColor end_color);
23 23
24 // Convert a premultiplied SkColor to a HSL value.
25 void SkColorToHSL(SkColor c, float hsl[3]);
brettw 2009/04/28 02:49:43 Since the colors are premultiplied, you should use
26
27 // Convert a HSL color to a premultiplied SkColor.
28 SkColor HSLToSKColor(U8CPU alpha, float hsl[3]);
29
24 } // namespace skia 30 } // namespace skia
25 31
26 #endif // SKIA_EXT_SKIA_UTILS_H_ 32 #endif // SKIA_EXT_SKIA_UTILS_H_
27 33
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698