mirror of
https://github.com/penpot/penpot.git
synced 2025-05-17 14:46:09 +02:00
🎉 Suport for show-content in render wasm
This commit is contained in:
parent
0eedc036be
commit
e1d9efea7f
5 changed files with 47 additions and 23 deletions
|
@ -111,7 +111,15 @@ pub extern "C" fn set_shape_selrect(left: f32, top: f32, right: f32, bottom: f32
|
|||
}
|
||||
|
||||
#[no_mangle]
|
||||
pub extern "C" fn set_shape_rotation(rotation: f32) {
|
||||
pub unsafe extern "C" fn set_shape_clip_content(clip_content: bool) {
|
||||
let state = unsafe { STATE.as_mut() }.expect("got an invalid state pointer");
|
||||
if let Some(shape) = state.current_shape() {
|
||||
shape.clip_content = clip_content;
|
||||
}
|
||||
}
|
||||
|
||||
#[no_mangle]
|
||||
pub unsafe extern "C" fn set_shape_rotation(rotation: f32) {
|
||||
let state = unsafe { STATE.as_mut() }.expect("got an invalid state pointer");
|
||||
if let Some(shape) = state.current_shape() {
|
||||
shape.rotation = rotation;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue