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 #include "sk_canvas.h" | 8 #include "sk_canvas.h" |
9 #include "sk_data.h" | 9 #include "sk_data.h" |
10 #include "sk_image.h" | 10 #include "sk_image.h" |
(...skipping 240 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
251 int sk_image_get_height(const sk_image_t* cimage) { | 251 int sk_image_get_height(const sk_image_t* cimage) { |
252 return AsImage(cimage)->height(); | 252 return AsImage(cimage)->height(); |
253 } | 253 } |
254 | 254 |
255 uint32_t sk_image_get_unique_id(const sk_image_t* cimage) { | 255 uint32_t sk_image_get_unique_id(const sk_image_t* cimage) { |
256 return AsImage(cimage)->uniqueID(); | 256 return AsImage(cimage)->uniqueID(); |
257 } | 257 } |
258 | 258 |
259 ////////////////////////////////////////////////////////////////////////////////
/////////// | 259 ////////////////////////////////////////////////////////////////////////////////
/////////// |
260 | 260 |
261 sk_path_t* sk_path_new() { | 261 sk_path_t* sk_path_new() { return (sk_path_t*)new SkPath; } |
262 return (sk_path_t*)SkNEW(SkPath); | |
263 } | |
264 | 262 |
265 void sk_path_delete(sk_path_t* cpath) { | 263 void sk_path_delete(sk_path_t* cpath) { delete as_path(cpath); } |
266 SkDELETE(as_path(cpath)); | |
267 } | |
268 | 264 |
269 void sk_path_move_to(sk_path_t* cpath, float x, float y) { | 265 void sk_path_move_to(sk_path_t* cpath, float x, float y) { |
270 as_path(cpath)->moveTo(x, y); | 266 as_path(cpath)->moveTo(x, y); |
271 } | 267 } |
272 | 268 |
273 void sk_path_line_to(sk_path_t* cpath, float x, float y) { | 269 void sk_path_line_to(sk_path_t* cpath, float x, float y) { |
274 as_path(cpath)->lineTo(x, y); | 270 as_path(cpath)->lineTo(x, y); |
275 } | 271 } |
276 | 272 |
277 void sk_path_quad_to(sk_path_t* cpath, float x0, float y0, float x1, float y1) { | 273 void sk_path_quad_to(sk_path_t* cpath, float x0, float y0, float x1, float y1) { |
(...skipping 425 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
703 | 699 |
704 size_t sk_data_get_size(const sk_data_t* cdata) { | 700 size_t sk_data_get_size(const sk_data_t* cdata) { |
705 return AsData(cdata)->size(); | 701 return AsData(cdata)->size(); |
706 } | 702 } |
707 | 703 |
708 const void* sk_data_get_data(const sk_data_t* cdata) { | 704 const void* sk_data_get_data(const sk_data_t* cdata) { |
709 return AsData(cdata)->data(); | 705 return AsData(cdata)->data(); |
710 } | 706 } |
711 | 707 |
712 ////////////////////////////////////////////////////////////////////////////////
/////////// | 708 ////////////////////////////////////////////////////////////////////////////////
/////////// |
OLD | NEW |