pub trait ViewportSize<T>where
    T: Mul<ScaleFactor, Output = f32> + Copy + 'static,
    f32: AsPrimitive<T>,{
    // Required method
    fn scale_viewport(self, scaling: Scale2D, viewport: Size<T>) -> Size<T>;
}
Expand description

Trait for size scaling relative to the viewport.

Required Methods§

source

fn scale_viewport(self, scaling: Scale2D, viewport: Size<T>) -> Size<T>

Produce a Size<T> scaled with the input scaling options.

Implementations on Foreign Types§

source§

impl<T> ViewportSize<T> for Size<T>where T: Mul<ScaleFactor, Output = f32> + Copy + 'static, f32: AsPrimitive<T>,

source§

fn scale_viewport(self, scaling: Scale2D, viewport: Size<T>) -> Size<T>where T: Mul<ScaleFactor, Output = f32> + Copy + 'static, f32: AsPrimitive<T>,

Implementors§