1 /*! 2 The drawing utils for Plotter. Which handles the both low-level and high-level 3 drawing. 4 5 For the low-level drawing abstraction, the module defines the `DrawingBackend` trait, 6 which handles low-level drawing of different shapes, such as, pixels, lines, rectangles, etc. 7 8 On the top of drawing backend, one or more drawing area can be defined and different coordinate 9 system can be applied to the drawing areas. And the drawing area implement the high-level drawing 10 interface, which draws an element. 11 12 Currently we have following backend implemented: 13 14 - `BitMapBackend`: The backend that creates bitmap, this is based on `image` crate 15 - `SVGBackend`: The backend that creates SVG image, based on `svg` crate. 16 - `PistonBackend`: The backend that uses Piston Window for real time rendering. Disabled by default, use feature `piston` to turn on. 17 - `CanvasBackend`: The backend that operates HTML5 Canvas, this is available when `Plotters` is targeting WASM. 18 19 */ 20 mod area; 21 mod backend_impl; 22 23 pub mod rasterizer; 24 25 pub mod backend; 26 27 pub use area::{DrawingArea, DrawingAreaErrorKind, IntoDrawingArea}; 28 29 pub use backend_impl::*; 30 31 pub use backend::DrawingBackend; 32