OLD | NEW |
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 #ifndef sk_types_DEFINED | 8 #ifndef sk_types_DEFINED |
9 #define sk_types_DEFINED | 9 #define sk_types_DEFINED |
10 | 10 |
(...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
45 typedef struct { | 45 typedef struct { |
46 float left; | 46 float left; |
47 float top; | 47 float top; |
48 float right; | 48 float right; |
49 float bottom; | 49 float bottom; |
50 } sk_rect_t; | 50 } sk_rect_t; |
51 | 51 |
52 typedef struct sk_path_t sk_path_t; | 52 typedef struct sk_path_t sk_path_t; |
53 | 53 |
54 sk_path_t* sk_path_new(); | 54 sk_path_t* sk_path_new(); |
| 55 void sk_path_delete(sk_path_t*); |
55 void sk_path_move_to(sk_path_t*, float x, float y); | 56 void sk_path_move_to(sk_path_t*, float x, float y); |
56 void sk_path_line_to(sk_path_t*, float x, float y); | 57 void sk_path_line_to(sk_path_t*, float x, float y); |
57 void sk_path_quad_to(sk_path_t*, float x0, float y0, float x1, float y1); | 58 void sk_path_quad_to(sk_path_t*, float x0, float y0, float x1, float y1); |
58 void sk_path_get_bounds(const sk_path_t*, sk_rect_t*); | 59 void sk_path_close(sk_path_t*); |
59 | 60 |
60 typedef struct sk_paint_t sk_paint_t; | 61 typedef struct sk_paint_t sk_paint_t; |
61 | 62 |
62 sk_paint_t* sk_paint_new(); | 63 sk_paint_t* sk_paint_new(); |
63 void sk_paint_delete(sk_paint_t*); | 64 void sk_paint_delete(sk_paint_t*); |
64 bool sk_paint_is_antialias(sk_paint_t*); | 65 bool sk_paint_is_antialias(const sk_paint_t*); |
65 void sk_paint_set_antialias(sk_paint_t*, bool); | 66 void sk_paint_set_antialias(sk_paint_t*, bool); |
66 sk_color_t sk_paint_get_color(const sk_paint_t*); | 67 sk_color_t sk_paint_get_color(const sk_paint_t*); |
67 void sk_paint_set_color(sk_paint_t*, sk_color_t); | 68 void sk_paint_set_color(sk_paint_t*, sk_color_t); |
68 | 69 |
69 typedef struct sk_canvas_t sk_canvas_t; | 70 typedef struct sk_canvas_t sk_canvas_t; |
70 typedef struct sk_image_t sk_image_t; | 71 typedef struct sk_image_t sk_image_t; |
71 | 72 |
72 void sk_canvas_save(sk_canvas_t*); | 73 void sk_canvas_save(sk_canvas_t*); |
73 void sk_canvas_save_layer(sk_canvas_t*, const sk_rect_t*, const sk_paint_t*); | 74 void sk_canvas_save_layer(sk_canvas_t*, const sk_rect_t*, const sk_paint_t*); |
74 void sk_canvas_restore(sk_canvas_t*); | 75 void sk_canvas_restore(sk_canvas_t*); |
(...skipping 22 matching lines...) Expand all Loading... |
97 sk_canvas_t* sk_surface_get_canvas(sk_surface_t*); | 98 sk_canvas_t* sk_surface_get_canvas(sk_surface_t*); |
98 sk_image_t* sk_surface_new_image_snapshot(sk_surface_t*); | 99 sk_image_t* sk_surface_new_image_snapshot(sk_surface_t*); |
99 | 100 |
100 #ifdef __cplusplus | 101 #ifdef __cplusplus |
101 class SkCanvas; | 102 class SkCanvas; |
102 void sk_test_capi(SkCanvas*); | 103 void sk_test_capi(SkCanvas*); |
103 } | 104 } |
104 #endif | 105 #endif |
105 | 106 |
106 #endif | 107 #endif |
OLD | NEW |