painter 0.2.2

A simple plotter library
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
use tiny_skia::{Pixmap, Transform};

pub struct Bound {
  pub x_min: f32,
  pub x_max: f32,
  pub y_min: f32,
  pub y_max: f32,
}
pub trait Drawable {
  fn draw(&self, pixmap: &mut Pixmap, ts: &Transform);
  fn bound(&self) -> Option<Bound>;
  fn name(&self) -> String;
  fn get_color(&self) -> [u8; 4];
  fn set_color(&mut self, color: [u8; 4]);
}