Add image scale option
This commit is contained in:
parent
f8ff567a00
commit
a6d5c9f671
4 changed files with 27 additions and 3 deletions
|
|
@ -15,6 +15,7 @@ pub struct ImageDrawing {
|
|||
pub image: RgbaImage,
|
||||
pub bright: bool,
|
||||
pub algo: DitherAlgorithm,
|
||||
pub scale: u32,
|
||||
}
|
||||
|
||||
impl Drawing for ImageDrawing {
|
||||
|
|
@ -33,6 +34,7 @@ impl Drawing for ImageDrawing {
|
|||
let image = Image::new(image)
|
||||
.with_dither_palette(&[BLACK, WHITE])
|
||||
.with_dither_algorithm(self.algo)
|
||||
.with_scale(self.scale)
|
||||
.node()
|
||||
.register(&mut tree)?;
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue