diff options
author | halcanary <halcanary@google.com> | 2015-07-31 13:38:06 -0700 |
---|---|---|
committer | Commit bot <commit-bot@chromium.org> | 2015-07-31 13:38:06 -0700 |
commit | 7568d0b15e9d66387533d397b5aaba60491e1624 (patch) | |
tree | 6ba1ca26e14f20de51631d9ead3e6a5c4e7ca321 /include/c | |
parent | 85cd78dd6ca93cc5bd4a504b201c3215426d885b (diff) |
C API: add sk_xfermode.h, impl, test
Review URL: https://codereview.chromium.org/1242403005
Diffstat (limited to 'include/c')
-rw-r--r-- | include/c/sk_paint.h | 5 | ||||
-rw-r--r-- | include/c/sk_types.h | 32 |
2 files changed, 37 insertions, 0 deletions
diff --git a/include/c/sk_paint.h b/include/c/sk_paint.h index 481147f1e5..382438051b 100644 --- a/include/c/sk_paint.h +++ b/include/c/sk_paint.h @@ -65,6 +65,11 @@ void sk_paint_set_shader(sk_paint_t*, sk_shader_t*); */ void sk_paint_set_maskfilter(sk_paint_t*, sk_maskfilter_t*); +/** + * Set the paint's xfermode to the specified parameter. + */ +void sk_paint_set_xfermode_mode(sk_paint_t*, sk_xfermode_mode_t); + SK_C_PLUS_PLUS_END_GUARD #endif diff --git a/include/c/sk_types.h b/include/c/sk_types.h index 17ba92972a..f517434764 100644 --- a/include/c/sk_types.h +++ b/include/c/sk_types.h @@ -108,6 +108,38 @@ typedef struct sk_picture_recorder_t sk_picture_recorder_t; typedef struct sk_shader_t sk_shader_t; typedef struct sk_surface_t sk_surface_t; +typedef enum { + CLEAR_SK_XFERMODE_MODE, + SRC_SK_XFERMODE_MODE, + DST_SK_XFERMODE_MODE, + SRCOVER_SK_XFERMODE_MODE, + DSTOVER_SK_XFERMODE_MODE, + SRCIN_SK_XFERMODE_MODE, + DSTIN_SK_XFERMODE_MODE, + SRCOUT_SK_XFERMODE_MODE, + DSTOUT_SK_XFERMODE_MODE, + SRCATOP_SK_XFERMODE_MODE, + DSTATOP_SK_XFERMODE_MODE, + XOR_SK_XFERMODE_MODE, + PLUS_SK_XFERMODE_MODE, + MODULATE_SK_XFERMODE_MODE, + SCREEN_SK_XFERMODE_MODE, + OVERLAY_SK_XFERMODE_MODE, + DARKEN_SK_XFERMODE_MODE, + LIGHTEN_SK_XFERMODE_MODE, + COLORDODGE_SK_XFERMODE_MODE, + COLORBURN_SK_XFERMODE_MODE, + HARDLIGHT_SK_XFERMODE_MODE, + SOFTLIGHT_SK_XFERMODE_MODE, + DIFFERENCE_SK_XFERMODE_MODE, + EXCLUSION_SK_XFERMODE_MODE, + MULTIPLY_SK_XFERMODE_MODE, + HUE_SK_XFERMODE_MODE, + SATURATION_SK_XFERMODE_MODE, + COLOR_SK_XFERMODE_MODE, + LUMINOSITY_SK_XFERMODE_MODE, +} sk_xfermode_mode_t; + ////////////////////////////////////////////////////////////////////////////////////////// #ifdef __cplusplus |