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

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

Простой интерфейс для связи кадра и графических функций

Implementations

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

pub fn new(
    graphics: &'graphics Graphics2D,
    frame: &'frame mut Frame
) -> Graphics<'graphics, 'frame>
[src]

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

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

Return 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 a 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 a 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 image based on ImageBase.

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

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

Draws image based on ImageBase rotated angle degrees.

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

Функции для работы с областями.

Function to work with ranges.

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

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

Draws image based on data from a 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 image based on data from a range.

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

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

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

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.