use geo::CoordFloat;
use geo_types::Coord;
use crate::Transform;
use super::st::St;
use super::str::Str;
#[derive(Clone, Debug)]
pub enum ScaleTranslateRotate<T> {
ST(St<T>),
STR(Str<T>),
}
impl<T> Transform for ScaleTranslateRotate<T>
where
T: CoordFloat,
{
type T = T;
#[inline]
fn transform(&self, p: &Coord<T>) -> Coord<T> {
match self {
Self::ST(st) => st.transform(p),
Self::STR(str) => str.transform(p),
}
}
#[inline]
fn invert(&self, p: &Coord<T>) -> Coord<T> {
match self {
Self::ST(st) => st.invert(p),
Self::STR(str) => str.invert(p),
}
}
}