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

Side by Side Diff: include/core/SkColor.h

Issue 19592014: SkAlpha constant defs (Closed) Base URL: https://skia.googlecode.com/svn/trunk
Patch Set: Created 7 years, 5 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
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 1
2 /* 2 /*
3 * Copyright 2006 The Android Open Source Project 3 * Copyright 2006 The Android Open Source Project
4 * 4 *
5 * Use of this source code is governed by a BSD-style license that can be 5 * Use of this source code is governed by a BSD-style license that can be
6 * found in the LICENSE file. 6 * found in the LICENSE file.
7 */ 7 */
8 8
9 9
10 #ifndef SkColor_DEFINED 10 #ifndef SkColor_DEFINED
(...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after
66 #define SkColorGetG(color) (((color) >> 8) & 0xFF) 66 #define SkColorGetG(color) (((color) >> 8) & 0xFF)
67 /** return the blue byte from a SkColor value */ 67 /** return the blue byte from a SkColor value */
68 #define SkColorGetB(color) (((color) >> 0) & 0xFF) 68 #define SkColorGetB(color) (((color) >> 0) & 0xFF)
69 69
70 static inline SkColor SkColorSetA(SkColor c, U8CPU a) { 70 static inline SkColor SkColorSetA(SkColor c, U8CPU a) {
71 return (c & 0x00FFFFFF) | (a << 24); 71 return (c & 0x00FFFFFF) | (a << 24);
72 } 72 }
73 73
74 // common colors 74 // common colors
75 75
76 #define SK_AlphaTRANSPARENT 0x00 //!< transparent SkAlpha value
77 #define SK_AlphaOPAQUE 0xFF //!< opaque SkAlpha value
78
76 #define SK_ColorTRANSPARENT 0x00000000 //!< transparent SkColor value 79 #define SK_ColorTRANSPARENT 0x00000000 //!< transparent SkColor value
77 80
78 #define SK_ColorBLACK 0xFF000000 //!< black SkColor value 81 #define SK_ColorBLACK 0xFF000000 //!< black SkColor value
79 #define SK_ColorDKGRAY 0xFF444444 //!< dark gray SkColor value 82 #define SK_ColorDKGRAY 0xFF444444 //!< dark gray SkColor value
80 #define SK_ColorGRAY 0xFF888888 //!< gray SkColor value 83 #define SK_ColorGRAY 0xFF888888 //!< gray SkColor value
81 #define SK_ColorLTGRAY 0xFFCCCCCC //!< light gray SkColor value 84 #define SK_ColorLTGRAY 0xFFCCCCCC //!< light gray SkColor value
82 #define SK_ColorWHITE 0xFFFFFFFF //!< white SkColor value 85 #define SK_ColorWHITE 0xFFFFFFFF //!< white SkColor value
83 86
84 #define SK_ColorRED 0xFFFF0000 //!< red SkColor value 87 #define SK_ColorRED 0xFFFF0000 //!< red SkColor value
85 #define SK_ColorGREEN 0xFF00FF00 //!< green SkColor value 88 #define SK_ColorGREEN 0xFF00FF00 //!< green SkColor value
(...skipping 71 matching lines...) Expand 10 before | Expand all | Expand 10 after
157 /** Define a function pointer type for combining two premultiplied colors 160 /** Define a function pointer type for combining two premultiplied colors
158 */ 161 */
159 typedef SkPMColor (*SkXfermodeProc)(SkPMColor src, SkPMColor dst); 162 typedef SkPMColor (*SkXfermodeProc)(SkPMColor src, SkPMColor dst);
160 163
161 /** Define a function pointer type for combining a premultiplied src color 164 /** Define a function pointer type for combining a premultiplied src color
162 and a 16bit device color. 165 and a 16bit device color.
163 */ 166 */
164 typedef uint16_t (*SkXfermodeProc16)(SkPMColor src, uint16_t dst); 167 typedef uint16_t (*SkXfermodeProc16)(SkPMColor src, uint16_t dst);
165 168
166 #endif 169 #endif
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698