feat: Added stuff
This commit is contained in:
@@ -13,6 +13,17 @@ pub struct BlurHash {
|
||||
punch: f32,
|
||||
}
|
||||
|
||||
impl core::fmt::Debug for BlurHash {
|
||||
fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result {
|
||||
f.debug_struct("BlurHash")
|
||||
.field("hash", &self.hash)
|
||||
.field("width", &self.width)
|
||||
.field("height", &self.height)
|
||||
.field("punch", &self.punch)
|
||||
.finish()
|
||||
}
|
||||
}
|
||||
|
||||
impl BlurHash {
|
||||
pub fn recompute(&mut self, width: u32, height: u32, punch: f32) {
|
||||
let pixels = blurhash::decode(&self.hash, width, height, punch)
|
||||
|
||||
Reference in New Issue
Block a user