mirror of
https://github.com/penpot/penpot.git
synced 2025-07-19 01:47:17 +02:00
🔧 Add vertical alignment for text shapes
This commit is contained in:
parent
0010d61ae2
commit
134fb1ab4c
8 changed files with 2436 additions and 1 deletions
|
@ -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| {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue