//! Raster and vector graphics. use super::prelude::*; use super::TextNode; use crate::diag::Error; use crate::image::ImageId; /// Show a raster or vector graphic. #[derive(Debug, Hash)] pub struct ImageNode(pub ImageId); #[class] impl ImageNode { /// How the image should adjust itself to a given area. pub const FIT: ImageFit = ImageFit::Cover; fn construct(vm: &mut Vm, args: &mut Args) -> TypResult