mirror of
https://github.com/penpot/penpot.git
synced 2025-05-21 08:36:11 +02:00
🎉 Implement drawing with blend mode (single fill)
This commit is contained in:
parent
7458165e51
commit
966e942a7f
5 changed files with 87 additions and 15 deletions
render-wasm/src
|
@ -128,6 +128,14 @@ pub extern "C" fn clear_shape_fills() {
|
|||
}
|
||||
}
|
||||
|
||||
#[no_mangle]
|
||||
pub extern "C" fn set_shape_blend_mode(mode: i32) {
|
||||
let state = unsafe { STATE.as_mut() }.expect("got an invalid state pointer");
|
||||
if let Some(shape) = state.current_shape() {
|
||||
shape.set_blend_mode(shapes::BlendMode::from(mode));
|
||||
}
|
||||
}
|
||||
|
||||
fn main() {
|
||||
render::init_gl();
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue