use crate::{ Canvas, ImgSyn, assist::{axial, polar}, }; #[derive(Clone, Copy)] pub struct ImgSynAxial(pub(crate) Prev); impl ImgSyn for ImgSynAxial where Prev: ImgSyn, { fn getpx(&self, meta: Canvas, x: f32, y: f32) -> crate::Pixel { let (x, y) = axial(x, y, meta); self.0.getpx(meta, x, y) } } #[derive(Clone, Copy)] pub struct ImgSynPolar(pub(crate) Prev); impl ImgSyn for ImgSynPolar where Prev: ImgSyn, { fn getpx(&self, meta: Canvas, x: f32, y: f32) -> crate::Pixel { let (x, y) = polar(x, y, meta); self.0.getpx(meta, x, y) } }