| 1 | /*! # The built-in rasterizers. |
| 2 | |
| 3 | Plotters make a minimal backend ability assumption - which is drawing a pixel on |
| 4 | backend. And this is the rasterizer that utilize this minimal ability to build a |
| 5 | fully functioning backend. |
| 6 | |
| 7 | */ |
| 8 | |
| 9 | // TODO: We need to revisit this. It has been a long time since last time we figured out |
| 10 | // the question mark operator has a huge performance impact due to LLVM unable to handle it. |
| 11 | // So the question is if this trick is still useful, or LLVM is smart enough to handle it since |
| 12 | // then. |
| 13 | // |
| 14 | // -- |
| 15 | // Original comment: |
| 16 | // |
| 17 | // ? operator is very slow. See issue #58 for details |
| 18 | macro_rules! check_result { |
| 19 | ($e:expr) => { |
| 20 | let result = $e; |
| 21 | #[allow(clippy::question_mark)] |
| 22 | if result.is_err() { |
| 23 | return result; |
| 24 | } |
| 25 | }; |
| 26 | } |
| 27 | |
| 28 | mod line; |
| 29 | pub use line::draw_line; |
| 30 | |
| 31 | mod rect; |
| 32 | pub use rect::draw_rect; |
| 33 | |
| 34 | mod circle; |
| 35 | pub use circle::draw_circle; |
| 36 | |
| 37 | mod polygon; |
| 38 | pub use polygon::fill_polygon; |
| 39 | |
| 40 | mod path; |
| 41 | pub use path::polygonize; |
| 42 | |