[][src]Struct cat_engine::graphics::Graphics

pub struct Graphics<'graphics, 'frame> { /* fields omitted */ }

Простой интерфейс для связи кадра и графических функций. Simple interface to connect graphic fuctions to the frame.

Implementations

impl<'graphics, 'frame> Graphics<'graphics, 'frame>[src]

pub fn frame(&mut self) -> &mut Frame[src]

Возвращает ссылку на кадр.

Returns the reference to the frame.

pub fn clear_colour(&mut self, colour: [f32; 4])[src]

pub fn draw_simple<'a, O: SimpleObject<'a>>(
    &mut self,
    object: &O,
    draw_parameters: &mut DrawParameters
) -> Result<(), DrawError>
[src]

Рисует простой объект.

Draws the simple object.

pub fn draw_shift_simple<'a, O: SimpleObject<'a>>(
    &mut self,
    object: &O,
    shift: [f32; 2],
    draw_parameters: &mut DrawParameters
) -> Result<(), DrawError>
[src]

Рисует сдвинутый простой объект.

Draws shifted simple object.

pub fn draw_character(
    &mut self,
    colour: Colour,
    character: &Character,
    draw_parameters: &mut DrawParameters
) -> Result<(), DrawError>
[src]

Рисует один символ.

Draws one character.

pub fn draw_image(
    &mut self,
    image_base: &ImageBase,
    texture: &Texture,
    draw_parameters: &mut DrawParameters
) -> Result<(), DrawError>
[src]

Рисует изображение на основе ImageBase.

Draws the image based on ImageBase.

pub fn draw_shift_image(
    &mut self,
    image_base: &ImageBase,
    texture: &Texture,
    shift: [f32; 2],
    draw_parameters: &mut DrawParameters
) -> Result<(), DrawError>
[src]

Рисует изображение на основе ImageBase.

Draws the image based on ImageBase.

pub fn draw_rotate_image(
    &mut self,
    image_base: &ImageBase,
    texture: &Texture,
    rotation_center: [f32; 2],
    angle: f32,
    draw_parameters: &mut DrawParameters
) -> Result<(), DrawError>
[src]

Рисует изображение на основе ImageBase c поворотом в 'angle' градусов.

Draws the image based on ImageBase rotated angle degrees.

impl<'graphics, 'frame> Graphics<'graphics, 'frame>[src]

pub fn draw_range_image(
    &mut self,
    index: usize,
    texture: &Texture,
    colour_filter: Colour,
    draw_parameters: &mut DrawParameters
) -> Result<(), DrawError>
[src]

Рисует изображение на основе данных из области.

Draws the image based on data from the range.

pub fn draw_shift_range_image(
    &mut self,
    index: usize,
    texture: &Texture,
    colour_filter: Colour,
    shift: [f32; 2],
    draw_parameters: &mut DrawParameters
) -> Result<(), DrawError>
[src]

Рисует сдвинутое изображение на основе данных из области.

Draws shifted the image based on data from the range.

pub fn draw_rotate_range_image(
    &mut self,
    index: usize,
    texture: &Texture,
    colour_filter: Colour,
    rotation_center: [f32; 2],
    angle: f32,
    draw_parameters: &mut DrawParameters
) -> Result<(), DrawError>
[src]

Рисует изображение с поворотом в 'angle' градусов на основе данных из области.

Draws the image based on data from the range rotated angle degrees.

rotation_center - [x, y] angle - radians

pub fn draw_range_simple<'a, O: SimpleObject<'a>>(
    &mut self,
    index: usize,
    object: &O,
    draw_parameters: &mut DrawParameters
) -> Result<(), DrawError>
[src]

Рисует простой объект на основе данных из области.

Draws the simple object based on data from the range.

Auto Trait Implementations

impl<'graphics, 'frame> !RefUnwindSafe for Graphics<'graphics, 'frame>

impl<'graphics, 'frame> !Send for Graphics<'graphics, 'frame>

impl<'graphics, 'frame> !Sync for Graphics<'graphics, 'frame>

impl<'graphics, 'frame> Unpin for Graphics<'graphics, 'frame>

impl<'graphics, 'frame> !UnwindSafe for Graphics<'graphics, 'frame>

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> From<T> for T[src]

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

impl<T> SetParameter for T

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.