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
|
|
@ -135,7 +135,7 @@ impl RendererBase<'_> {
|
|||
let (twidth, theight) = if let Some(size) = tsize {
|
||||
size
|
||||
} else {
|
||||
let (mut w, mut h) = (texture.width(), texture.height());
|
||||
let (mut w, mut h) = texture.size();
|
||||
if tscale != self.scale {
|
||||
let tscale = tscale.to_f64();
|
||||
w = (w as f64 * self.scalef / tscale).round() as _;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue