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

Side by Side Diff: src/c/sk_paint.cpp

Issue 1307183006: C API: Add SK_API, also documentation of an example. (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: 2015-09-01 (Tuesday) 12:56:15 EDT Created 5 years, 3 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
« no previous file with comments | « include/c/sk_types.h ('k') | src/c/sk_surface.cpp » ('j') | 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 * 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
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 }
OLDNEW
« no previous file with comments | « include/c/sk_types.h ('k') | src/c/sk_surface.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698