[][src]Struct cat_engine::graphics::Graphics2D

pub struct Graphics2D { /* fields omitted */ }

Графическая основа. A graphics base.

Области. Ranges.

Вы можете выбрать область в буфере вершин и сохранить туда вершины объектов. Это помогает ускорить процесс отрисовки неменяющихся объектов.

You can choose a range of the vertex buffer and save there vertexes of objects. It speeds up drawing unchanging objects.

Implementations

impl Graphics2D[src]

pub fn bind_image(
    &mut self,
    range: Range<usize>,
    image_base: ImageBase
) -> Option<usize>
[src]

Сохраняет координаты картинки в выбранной области в буфере. Возращает номер области, если она не выходит за границы буфера.

Только для невращающихся изображений.

Для вывода изображения из этой области используется функция 'draw_range_image'.

Saves vertexes of the image to the given range of the vertex buffer. Returns the index of the range.

Only for non-rotating images.

Use 'draw_range_image' for drawing.

pub fn bind_rotating_image(
    &mut self,
    range: Range<usize>,
    image_base: ImageBase
) -> Option<usize>
[src]

Сохраняет координаты картинки в выбранной области в буфере. Возращает номер области, если она не выходит за границы буфера.

Только для вращающихся изображений.

Для вывода изображения из этой области используется функция 'draw_rotate_range_image'.

Saves vertexes of the image to the given range of the vertex buffer. Returns the index of the range.

Only for rotating images.

Use 'draw_rotate_range_image' for drawing.

pub fn rewrite_range_image(
    &mut self,
    range: usize,
    image_base: ImageBase
) -> Option<()>
[src]

Обновляет значения области массива для текстур.

Только для невращающихся изображений.

Rewrites the range with new ImageBase.

Only for non-rotating images.

pub fn rewrite_range_rotating_image(
    &mut self,
    range: usize,
    image_base: ImageBase
) -> Option<()>
[src]

Обновляет значения области массива для текстур.

Только для вращающихся изображений.

Rewrites the range with new ImageBase.

Only for rotating images.

pub fn pop_texture(&mut self) -> Option<Range<usize>>[src]

Удаляет и возращает последюю область из массива областей текстур.

Removes the last range from the range buffer of textures.

pub fn unbind_texture(&mut self, index: usize)[src]

Удаляет область из массива областей текстур.

Removes the range from the range buffer of textures.

impl Graphics2D[src]

pub fn add_simple_object<O: SimpleObject>(
    &mut self,
    object: &O
) -> Option<usize>
[src]

Добавляет простой объект в массив.

Adds the simple object to the array.

pub fn delete_last_simple_object(&mut self)[src]

Удаляет последний простой объект в массиве, если такой есть.

Deletes the last simple object of the array if there is any.

pub fn clear_simple_object_array(&mut self)[src]

Отчищает массив объектов.

Clears the object array.

Auto Trait Implementations

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.