pub trait ViewportSize<T>{
// Required method
fn scale_viewport(
self,
scaling: Scale2D,
viewport: Size<T>,
original: Size<T>,
clamp: Option<T>,
) -> Size<T>;
}
Expand description
Trait for size scaling relative to the viewport.
Required Methods§
Sourcefn scale_viewport(
self,
scaling: Scale2D,
viewport: Size<T>,
original: Size<T>,
clamp: Option<T>,
) -> Size<T>
fn scale_viewport( self, scaling: Scale2D, viewport: Size<T>, original: Size<T>, clamp: Option<T>, ) -> Size<T>
Produce a Size<T>
scaled with the input scaling options.
The size will at minimum be 1x1, and at a maximum of the specified clamp
value, or 16384x16384 if the clamp value is not specified.