🐛 Fix blend mode against background

This commit is contained in:
Belén Albeza 2024-12-11 16:48:41 +01:00
parent 579a5729e6
commit 21da6ddd4a
5 changed files with 34 additions and 2 deletions

View file

@ -49,6 +49,14 @@ pub extern "C" fn set_render_options(debug: u32, dpr: f32) {
render_state.set_dpr(dpr);
}
#[no_mangle]
pub extern "C" fn set_canvas_background(raw_color: u32) {
let state = unsafe { STATE.as_mut() }.expect("got an invalid state pointer");
let color = skia::Color::new(raw_color);
state.set_background_color(color);
}
#[no_mangle]
pub unsafe extern "C" fn render() {
let state = unsafe { STATE.as_mut() }.expect("got an invalid state pointer");