1: when i want resolve images in run ,the 'pic.image' is empty
RunChild::Drawing(draw_box) => {
let drawing_data = draw_box.data.unwrap();
match drawing_data {
DrawingData::Pic(pic) => {
println!("fount image");
let pic_image = pic.image;
println!("image data size:{}", picimage.len())
}
DrawingData::TextBox() => {}
}
}
2: in impl Pic {},I suggest give a function to reset image:Vec[u8],and hold on other properties mayby like:
pub fn reset_image(mut self, image:Vec[u8]) -> Pic {
self.image = image;
self
}
1: when i want resolve images in run ,the 'pic.image' is empty RunChild::Drawing(draw_box) => { let drawing_data = draw_box.data.unwrap(); match drawing_data { DrawingData::Pic(pic) => { println!("fount image"); let pic_image = pic.image; println!("image data size:{}", picimage.len()) } DrawingData::TextBox() => {} } } 2: in impl Pic {},I suggest give a function to reset image:Vec[u8],and hold on other properties mayby like: pub fn reset_image(mut self, image:Vec[u8]) -> Pic { self.image = image; self }