render: compute image width/height in single function call
This commit is contained in:
parent
db9c382002
commit
4ba8550da8
7 changed files with 18 additions and 18 deletions
|
|
@ -194,7 +194,7 @@ impl OutputNode {
|
|||
};
|
||||
ws.title_texture.set(Some(title.clone()));
|
||||
let mut x = pos + 1;
|
||||
let mut width = title.texture.width();
|
||||
let (mut width, _) = title.texture.size();
|
||||
if let Some(scale) = scale {
|
||||
width = (width as f64 / scale).round() as _;
|
||||
}
|
||||
|
|
@ -253,7 +253,7 @@ impl OutputNode {
|
|||
break 'set_status;
|
||||
}
|
||||
};
|
||||
let mut width = title.texture.width();
|
||||
let (mut width, _) = title.texture.size();
|
||||
if let Some(scale) = scale {
|
||||
width = (width as f64 / scale).round() as _;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue