Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Expose SkBlender #123

Merged
merged 1 commit into from
Apr 15, 2024
Merged

Expose SkBlender #123

merged 1 commit into from
Apr 15, 2024

Conversation

mattleibow
Copy link

@mattleibow mattleibow commented Apr 14, 2024

Description of Change

Adds a new type SkBlender and usages of that type to the C API.

SkiaSharp Issue

Related to mono/SkiaSharp#2830

API Changes

// sk_blender_t
void sk_blender_ref(sk_blender_t* blender);
void sk_blender_unref(sk_blender_t* blender);
sk_blender_t* sk_blender_new_mode(sk_blendmode_t mode);
sk_blender_t* sk_blender_new_arithmetic(float k1, float k2, float k3, float k4, bool enforcePremul);

// sk_imagefilter_t
sk_imagefilter_t* sk_imagefilter_new_blender(sk_blender_t* blender, const sk_imagefilter_t* background, const sk_imagefilter_t* foreground, const sk_rect_t* cropRect);

// sk_paint_t
void sk_paint_set_blender(sk_paint_t* paint, sk_blender_t* blender);
sk_blender_t* sk_paint_get_blender(sk_paint_t* cpaint);

// sk_runtimeeffect_t
sk_runtimeeffect_t* sk_runtimeeffect_make_for_blender(sk_string_t* sksl, sk_string_t* error);
sk_blender_t* sk_runtimeeffect_make_blender(sk_runtimeeffect_t* effect, sk_data_t* uniforms, sk_flattenable_t** children, size_t childCount);

// sk_shader_t
sk_shader_t* sk_shader_new_blender(sk_blender_t* blender, const sk_shader_t* dst, const sk_shader_t* src);

Behavioral Changes

None.

Required SkiaSharp PR

Requires mono/SkiaSharp#2830

PR Checklist

  • Rebased on top of skiasharp at time of PR
  • Changes adhere to coding standard
  • Updated documentation

@mattleibow mattleibow mentioned this pull request Apr 14, 2024
5 tasks
@mattleibow mattleibow merged commit f1c2f7b into skiasharp Apr 15, 2024
1 check passed
@mattleibow mattleibow deleted the dev/blender branch April 15, 2024 21:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant