[−][src]Struct gfx_gtk::Viewport
Describes the client area of the GlArea being rendered into
Fields
width: i32Width of the render target in pixels. This may be larger than the actual client window size.
height: i32Height of the render target in pixels. This may be larger than the actual client window size.
target_width: i32Width of the GlArea client in pixels
target_height: i32Height of the GlArea client in pixels
aa: AaModeAntialiasing mode (supported Single and Multi(4))
Methods
impl Viewport[src]
pub fn aspect_ratio(&self) -> f32[src]
The ratio between width and height of the
pub fn with_aa(aa: AaMode, target_width: i32, target_height: i32) -> Self[src]
Creates a new Viewport from the specified source GlArea size. width and height
will be determined accordingly and taking into account supersampling if applicable
aaantialiasing mode, currently supportedSingleandMulti(4)target_widthwidth of the client area of the containing widgettarget_heightheight of the client area of the containing widget`
Trait Implementations
Auto Trait Implementations
Blanket Implementations
impl<T> From for T[src]
impl<T, U> Into for T where
U: From<T>, [src]
U: From<T>,
impl<T> ToOwned for T where
T: Clone, [src]
T: Clone,
impl<T, U> TryFrom for T where
U: Into<T>, [src]
U: Into<T>,
type Error = !
🔬 This is a nightly-only experimental API. (
try_from)The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>[src]
impl<T> Borrow for T where
T: ?Sized, [src]
T: ?Sized,
impl<T> Any for T where
T: 'static + ?Sized, [src]
T: 'static + ?Sized,
impl<T> BorrowMut for T where
T: ?Sized, [src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T[src]
impl<T, U> TryInto for T where
U: TryFrom<T>, [src]
U: TryFrom<T>,