Struct gfx_gtk::Viewport[][src]

pub struct Viewport {
    pub width: i32,
    pub height: i32,
    pub target_width: i32,
    pub target_height: i32,
    pub aa: AaMode,
}

Describes the client area of the GlArea being rendered into

Fields

Width of the render target in pixels. This may be larger than the actual client window size.

Height of the render target in pixels. This may be larger than the actual client window size.

Width of the GlArea client in pixels

Height of the GlArea client in pixels

Antialiasing mode (supported Single and Multi(4))

Methods

impl Viewport
[src]

The ratio between width and height of the

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 supported Single and Multi(4)
  • target_width width of the client area of the containing widget
  • target_height height of the client area of the containing widget`

Trait Implementations

impl Clone for Viewport
[src]

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

Auto Trait Implementations

impl Send for Viewport

impl Sync for Viewport