Fix Image::bounds when rotation present in iced_graphics
This commit is contained in:
parent
568ac66486
commit
eac5bcb64f
5 changed files with 37 additions and 17 deletions
|
|
@ -41,9 +41,12 @@ impl Image {
|
|||
/// Returns the bounds of the [`Image`].
|
||||
pub fn bounds(&self) -> Rectangle {
|
||||
match self {
|
||||
Image::Raster { bounds, .. } | Image::Vector { bounds, .. } => {
|
||||
*bounds
|
||||
Image::Raster {
|
||||
bounds, rotation, ..
|
||||
}
|
||||
| Image::Vector {
|
||||
bounds, rotation, ..
|
||||
} => bounds.rotate(*rotation),
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue