use crate::error::{PyrucastError, Result};
use crate::viz::camera::Bbox3;
use crate::viz::View;
use plotters::coord::Shift;
use plotters::prelude::*;
pub(crate) fn pl_err<E: std::error::Error + Send + Sync + 'static>(
e: DrawingAreaErrorKind<E>,
) -> PyrucastError {
PyrucastError::Message(format!("plotters: {e}"))
}
pub trait Drawable {
fn bbox(&self) -> Result<Bbox3>;
fn draw_on<DB: DrawingBackend>(&self, area: &DrawingArea<DB, Shift>, view: &View) -> Result<()>
where
DB::ErrorType: 'static;
fn is_axisymmetric(&self) -> bool {
false
}
}