use whiskers::prelude::*; #[sketch_app] struct HelloWorldSketch { width: f64, height: f64, } impl Default for HelloWorldSketch { fn default() -> Self { Self { width: 400.0, height: 300.0, } } } impl App for HelloWorldSketch { fn update(&mut self, sketch: &mut Sketch, _ctx: &mut Context) -> anyhow::Result<()> { sketch.color(Color::DARK_RED).stroke_width(3.0); sketch .translate(sketch.width() / 2.0, sketch.height() / 2.0) .rect(0., 0., self.width, self.height); Ok(()) } } fn main() -> Result { HelloWorldSketch::runner() .with_page_size_options(PageSize::A5H) .run() }