[][src]Struct swsurface::Config

pub struct Config {
    pub vsync: bool,
    pub image_count: usize,
    pub align: usize,
    pub scanline_align: usize,
    pub opaque: bool,
}

Configuration for a Surface.

Fields

vsync: bool

Enable vertical sync.

This flag is merely a hint and may be ignored.

image_count: usize

The preferred number of swapchain images. Must be >= 1.

This value is merely a hint and may be ignored.

align: usize

The preferred memory alignment of swapchain images.

  • This value must not be zero.
  • This value must be a power of two.
  • This value is merely a hint and may be ignored.
scanline_align: usize

The preferred memory alignment of scanlines in swapchain images.

  • This value must not be zero.
  • This value must be a power of two.
  • This value must be equal to or less than align.
  • This value is merely a hint and may be ignored.
opaque: bool

Specifies whether the surface is opaque or not.

If false is specified, the content of the surface is blended over the content below the window. The alpha values are interpreted as pre-multiplied alpha. You also have to specify an appropriate window creation option such as WindowBuilder::with_transparent(true) and use a pixel format having an alpha channel for this option to work.

Defaults to true.

Methods

impl Config[src]

pub fn new() -> Self[src]

Construct a default Config.

Trait Implementations

impl Clone for Config[src]

impl Copy for Config[src]

impl Debug for Config[src]

impl Default for Config[src]

Auto Trait Implementations

impl RefUnwindSafe for Config

impl Send for Config

impl Sync for Config

impl Unpin for Config

impl UnwindSafe for Config

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> Erased for T[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.