OLD | NEW |
1 /* | 1 /* |
2 * Copyright 2015 Google Inc. | 2 * Copyright 2015 Google Inc. |
3 * | 3 * |
4 * Use of this source code is governed by a BSD-style license that can be | 4 * Use of this source code is governed by a BSD-style license that can be |
5 * found in the LICENSE file. | 5 * found in the LICENSE file. |
6 */ | 6 */ |
7 | 7 |
| 8 #include "SkPaint.h" |
| 9 |
8 #include "sk_paint.h" | 10 #include "sk_paint.h" |
9 #include "sk_types_priv.h" | 11 #include "sk_types_priv.h" |
10 | 12 |
11 #include "SkPaint.h" | |
12 | |
13 #define MAKE_FROM_TO_NAME(FROM) g_ ## FROM ## _map | 13 #define MAKE_FROM_TO_NAME(FROM) g_ ## FROM ## _map |
14 | 14 |
15 const struct { | 15 const struct { |
16 sk_stroke_cap_t fC; | 16 sk_stroke_cap_t fC; |
17 SkPaint::Cap fSK; | 17 SkPaint::Cap fSK; |
18 } MAKE_FROM_TO_NAME(sk_stroke_cap_t)[] = { | 18 } MAKE_FROM_TO_NAME(sk_stroke_cap_t)[] = { |
19 { BUTT_SK_STROKE_CAP, SkPaint::kButt_Cap }, | 19 { BUTT_SK_STROKE_CAP, SkPaint::kButt_Cap }, |
20 { ROUND_SK_STROKE_CAP, SkPaint::kRound_Cap }, | 20 { ROUND_SK_STROKE_CAP, SkPaint::kRound_Cap }, |
21 { SQUARE_SK_STROKE_CAP, SkPaint::kSquare_Cap }, | 21 { SQUARE_SK_STROKE_CAP, SkPaint::kSquare_Cap }, |
22 }; | 22 }; |
(...skipping 138 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
161 MAP( HUE_SK_XFERMODE_MODE, SkXfermode::kHue_Mode ); | 161 MAP( HUE_SK_XFERMODE_MODE, SkXfermode::kHue_Mode ); |
162 MAP( SATURATION_SK_XFERMODE_MODE, SkXfermode::kSaturation_Mode ); | 162 MAP( SATURATION_SK_XFERMODE_MODE, SkXfermode::kSaturation_Mode ); |
163 MAP( COLOR_SK_XFERMODE_MODE, SkXfermode::kColor_Mode ); | 163 MAP( COLOR_SK_XFERMODE_MODE, SkXfermode::kColor_Mode ); |
164 MAP( LUMINOSITY_SK_XFERMODE_MODE, SkXfermode::kLuminosity_Mode ); | 164 MAP( LUMINOSITY_SK_XFERMODE_MODE, SkXfermode::kLuminosity_Mode ); |
165 #undef MAP | 165 #undef MAP |
166 default: | 166 default: |
167 return; | 167 return; |
168 } | 168 } |
169 AsPaint(paint)->setXfermodeMode(skmode); | 169 AsPaint(paint)->setXfermodeMode(skmode); |
170 } | 170 } |
OLD | NEW |