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

Side by Side Diff: include/c/sk_paint.h

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_image.h ('k') | include/c/sk_path.h » ('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 2014 Google Inc. 2 * Copyright 2014 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 // EXPERIMENTAL EXPERIMENTAL EXPERIMENTAL EXPERIMENTAL 8 // EXPERIMENTAL EXPERIMENTAL EXPERIMENTAL EXPERIMENTAL
9 // DO NOT USE -- FOR INTERNAL TESTING ONLY 9 // DO NOT USE -- FOR INTERNAL TESTING ONLY
10 10
11 #ifndef sk_paint_DEFINED 11 #ifndef sk_paint_DEFINED
12 #define sk_paint_DEFINED 12 #define sk_paint_DEFINED
13 13
14 #include "sk_types.h" 14 #include "sk_types.h"
15 15
16 SK_C_PLUS_PLUS_BEGIN_GUARD 16 SK_C_PLUS_PLUS_BEGIN_GUARD
17 17
18 sk_paint_t* sk_paint_new(); 18 SK_API sk_paint_t* sk_paint_new();
19 void sk_paint_delete(sk_paint_t*); 19 SK_API void sk_paint_delete(sk_paint_t*);
20 20
21 bool sk_paint_is_antialias(const sk_paint_t*); 21 SK_API bool sk_paint_is_antialias(const sk_paint_t*);
22 void sk_paint_set_antialias(sk_paint_t*, bool); 22 SK_API void sk_paint_set_antialias(sk_paint_t*, bool);
23 23
24 sk_color_t sk_paint_get_color(const sk_paint_t*); 24 SK_API sk_color_t sk_paint_get_color(const sk_paint_t*);
25 void sk_paint_set_color(sk_paint_t*, sk_color_t); 25 SK_API void sk_paint_set_color(sk_paint_t*, sk_color_t);
26 26
27 /* stroke settings */ 27 /* stroke settings */
28 28
29 bool sk_paint_is_stroke(const sk_paint_t*); 29 SK_API bool sk_paint_is_stroke(const sk_paint_t*);
30 void sk_paint_set_stroke(sk_paint_t*, bool); 30 SK_API void sk_paint_set_stroke(sk_paint_t*, bool);
31 31
32 float sk_paint_get_stroke_width(const sk_paint_t*); 32 SK_API float sk_paint_get_stroke_width(const sk_paint_t*);
33 void sk_paint_set_stroke_width(sk_paint_t*, float width); 33 SK_API void sk_paint_set_stroke_width(sk_paint_t*, float width);
34 34
35 float sk_paint_get_stroke_miter(const sk_paint_t*); 35 SK_API float sk_paint_get_stroke_miter(const sk_paint_t*);
36 void sk_paint_set_stroke_miter(sk_paint_t*, float miter); 36 SK_API void sk_paint_set_stroke_miter(sk_paint_t*, float miter);
37 37
38 typedef enum { 38 typedef enum {
39 BUTT_SK_STROKE_CAP, 39 BUTT_SK_STROKE_CAP,
40 ROUND_SK_STROKE_CAP, 40 ROUND_SK_STROKE_CAP,
41 SQUARE_SK_STROKE_CAP 41 SQUARE_SK_STROKE_CAP
42 } sk_stroke_cap_t; 42 } sk_stroke_cap_t;
43 43
44 sk_stroke_cap_t sk_paint_get_stroke_cap(const sk_paint_t*); 44 SK_API sk_stroke_cap_t sk_paint_get_stroke_cap(const sk_paint_t*);
45 void sk_paint_set_stroke_cap(sk_paint_t*, sk_stroke_cap_t); 45 SK_API void sk_paint_set_stroke_cap(sk_paint_t*, sk_stroke_cap_t);
46 46
47 typedef enum { 47 typedef enum {
48 MITER_SK_STROKE_JOIN, 48 MITER_SK_STROKE_JOIN,
49 ROUND_SK_STROKE_JOIN, 49 ROUND_SK_STROKE_JOIN,
50 BEVEL_SK_STROKE_JOIN 50 BEVEL_SK_STROKE_JOIN
51 } sk_stroke_join_t; 51 } sk_stroke_join_t;
52 52
53 sk_stroke_join_t sk_paint_get_stroke_join(const sk_paint_t*); 53 SK_API sk_stroke_join_t sk_paint_get_stroke_join(const sk_paint_t*);
54 void sk_paint_set_stroke_join(sk_paint_t*, sk_stroke_join_t); 54 SK_API void sk_paint_set_stroke_join(sk_paint_t*, sk_stroke_join_t);
55 55
56 /** 56 /**
57 * Set the paint's shader to the specified parameter. This will automatically c all unref() on 57 * Set the paint's shader to the specified parameter. This will automatically c all unref() on
58 * any previous value, and call ref() on the new value. 58 * any previous value, and call ref() on the new value.
59 */ 59 */
60 void sk_paint_set_shader(sk_paint_t*, sk_shader_t*); 60 SK_API void sk_paint_set_shader(sk_paint_t*, sk_shader_t*);
61 61
62 /** 62 /**
63 * Set the paint's maskfilter to the specified parameter. This will automatical ly call unref() on 63 * Set the paint's maskfilter to the specified parameter. This will automatical ly call unref() on
64 * any previous value, and call ref() on the new value. 64 * any previous value, and call ref() on the new value.
65 */ 65 */
66 void sk_paint_set_maskfilter(sk_paint_t*, sk_maskfilter_t*); 66 SK_API void sk_paint_set_maskfilter(sk_paint_t*, sk_maskfilter_t*);
67 67
68 /** 68 /**
69 * Set the paint's xfermode to the specified parameter. 69 * Set the paint's xfermode to the specified parameter.
70 */ 70 */
71 void sk_paint_set_xfermode_mode(sk_paint_t*, sk_xfermode_mode_t); 71 SK_API void sk_paint_set_xfermode_mode(sk_paint_t*, sk_xfermode_mode_t);
72 72
73 SK_C_PLUS_PLUS_END_GUARD 73 SK_C_PLUS_PLUS_END_GUARD
74 74
75 #endif 75 #endif
OLDNEW
« no previous file with comments | « include/c/sk_image.h ('k') | include/c/sk_path.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698