Trait SurfaceFrame

Source
pub trait SurfaceFrame {
    // Required methods
    fn view_size(&self) -> ViewSize;
    fn resize_surface(&mut self);
    fn resize_surface_by_size(&mut self, size: (u32, u32));

    // Provided methods
    fn pintch(&mut self, _touch: Touch, _scale: f32) { ... }
    fn touch(&mut self, _touch: Touch) { ... }
    fn normalize_touch_point(
        &self,
        _touch_point_x: f32,
        _touch_point_y: f32,
    ) -> (f32, f32) { ... }
    fn enter_frame(&mut self) { ... }
    fn get_current_frame_view(
        &self,
        _view_format: Option<TextureFormat>,
    ) -> (SurfaceTexture, TextureView) { ... }
    fn create_current_frame_view(
        &self,
        device: &Device,
        surface: &Surface<'_>,
        config: &SurfaceConfiguration,
        view_format: Option<TextureFormat>,
    ) -> (SurfaceTexture, TextureView) { ... }
}

Required Methods§

Source

fn view_size(&self) -> ViewSize

Source

fn resize_surface(&mut self)

Source

fn resize_surface_by_size(&mut self, size: (u32, u32))

Provided Methods§

Source

fn pintch(&mut self, _touch: Touch, _scale: f32)

Source

fn touch(&mut self, _touch: Touch)

Source

fn normalize_touch_point( &self, _touch_point_x: f32, _touch_point_y: f32, ) -> (f32, f32)

Source

fn enter_frame(&mut self)

Source

fn get_current_frame_view( &self, _view_format: Option<TextureFormat>, ) -> (SurfaceTexture, TextureView)

Source

fn create_current_frame_view( &self, device: &Device, surface: &Surface<'_>, config: &SurfaceConfiguration, view_format: Option<TextureFormat>, ) -> (SurfaceTexture, TextureView)

Implementors§