🔧 Add vertical alignment for text shapes

This commit is contained in:
Elena Torro 2025-06-23 16:01:03 +02:00
parent 0010d61ae2
commit 134fb1ab4c
8 changed files with 2436 additions and 1 deletions

View file

@ -19,6 +19,7 @@ use math::{Bounds, Matrix};
use mem::SerializableResult;
use shapes::{
BoolType, ConstraintH, ConstraintV, StructureEntry, StructureEntryType, TransformEntry, Type,
VerticalAlign,
};
use skia_safe as skia;
use state::State;
@ -346,6 +347,13 @@ pub extern "C" fn set_shape_blend_mode(mode: i32) {
});
}
#[no_mangle]
pub extern "C" fn set_shape_vertical_align(align: u8) {
with_current_shape!(state, |shape: &mut Shape| {
shape.set_vertical_align(VerticalAlign::from(align));
});
}
#[no_mangle]
pub extern "C" fn set_shape_opacity(opacity: f32) {
with_current_shape!(state, |shape: &mut Shape| {