From 6233142c8dc9c41c51d03944d5a253448dc8260b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Dariusz=20Komosi=C5=84ski?= Date: Sat, 9 Mar 2019 20:16:56 +0100 Subject: [PATCH] Expose reset method on SkPaint --- include/c/sk_paint.h | 1 + src/c/sk_paint.cpp | 4 ++++ 2 files changed, 5 insertions(+) diff --git a/include/c/sk_paint.h b/include/c/sk_paint.h index 256a8729efc2..b9765f518192 100644 --- a/include/c/sk_paint.h +++ b/include/c/sk_paint.h @@ -17,6 +17,7 @@ SK_C_PLUS_PLUS_BEGIN_GUARD SK_C_API sk_paint_t* sk_paint_new(void); SK_C_API sk_paint_t* sk_paint_clone(sk_paint_t*); SK_C_API void sk_paint_delete(sk_paint_t*); +SK_C_API void sk_paint_reset(sk_paint_t*); SK_C_API bool sk_paint_is_antialias(const sk_paint_t*); SK_C_API void sk_paint_set_antialias(sk_paint_t*, bool); SK_C_API sk_color_t sk_paint_get_color(const sk_paint_t*); diff --git a/src/c/sk_paint.cpp b/src/c/sk_paint.cpp index 98531a6b215b..03a3dfa6b896 100644 --- a/src/c/sk_paint.cpp +++ b/src/c/sk_paint.cpp @@ -30,6 +30,10 @@ sk_paint_t* sk_paint_clone(sk_paint_t* paint) { void sk_paint_delete(sk_paint_t* cpaint) { delete AsPaint(cpaint); } +void sk_paint_reset(sk_paint_t* cpaint) { + AsPaint(cpaint)->reset(); +} + bool sk_paint_is_antialias(const sk_paint_t* cpaint) { return AsPaint(cpaint)->isAntiAlias(); }