mirror of
https://github.com/penpot/penpot.git
synced 2025-06-13 01:41:38 +02:00
✨ Set selrect for new render modifiers
This commit is contained in:
parent
6831acb71d
commit
fef08dfa18
13 changed files with 200 additions and 72 deletions
|
@ -47,15 +47,11 @@ pub extern "C" fn get_text_dimensions() -> *mut u8 {
|
|||
height = shape.selrect.height();
|
||||
|
||||
if let Type::Text(content) = &shape.shape_type {
|
||||
let paragraphs = content.get_skia_paragraphs(font_col);
|
||||
height = auto_height(¶graphs).ceil();
|
||||
match content.grow_type() {
|
||||
GrowType::AutoWidth => {
|
||||
let paragraphs = content.get_skia_paragraphs(font_col);
|
||||
width = auto_width(¶graphs);
|
||||
height = auto_height(¶graphs);
|
||||
}
|
||||
GrowType::AutoHeight => {
|
||||
let paragraphs = content.get_skia_paragraphs(font_col);
|
||||
height = auto_height(¶graphs);
|
||||
width = auto_width(¶graphs).ceil();
|
||||
}
|
||||
_ => {}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue