[−][src]Struct gfx_gtk::Viewport
Describes the client area of the GlArea being rendered into
Fields
width: i32
Width of the render target in pixels. This may be larger than the actual client window size.
height: i32
Height of the render target in pixels. This may be larger than the actual client window size.
target_width: i32
Width of the GlArea client in pixels
target_height: i32
Height of the GlArea client in pixels
aa: AaMode
Antialiasing 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
aa
antialiasing mode, currently supportedSingle
andMulti(4)
target_width
width of the client area of the containing widgettarget_height
height 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>,