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

pub struct Graphics2D { /* fields omitted */ }

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

Implementations

impl Graphics2D[src]

pub fn add_simple_object<'o, O, V, I>(&mut self, object: &'o O) -> Option<usize> where
    O: DependentObject<'o, Vertex2D, u8, Vertices = V, Indices = I>,
    V: AsRef<[Vertex2D]> + 'o,
    I: AsRef<[u8]> + 'o, 
[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.

pub fn get_simple_object_colour(&mut self, index: usize) -> &mut Colour[src]

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

Returns a reference to the object's colour.

pub fn set_simple_object_colour(&mut self, index: usize, colour: Colour)[src]

Устанавливает цвет объекта.

Паникует, если нет такого объекта.

Sets the colour of the object.

Panics if there is no such object.

pub fn set_simple_object_primitive_type(
    &mut self,
    index: usize,
    primitive_type: PrimitiveType
)
[src]

Устанавливает тип отрисовки объекта.

Паникует, если нет такого объекта.

Sets the primitive type of the object.

Panics if there is no such object.

pub fn rewrite_simple_object_vertices(
    &mut self,
    index: usize,
    vertices: &[Vertex2D]
)
[src]

Переписывает вершины объекта.

Паникует, если нет такого объекта или размер vertices отличается от установленного.

Rewrites vertices of the object.

Panics if there is no such object or the vertices size differs from the set.

pub fn rewrite_simple_object_indices(&mut self, index: usize, indices: &[u8])[src]

Переписывает индексы объекта.

Паникует, если нет такого объекта или размер indices отличается от установленного.

Rewrites indices of the object.

Panics if there is no such object or the indices size differs from the set.

impl Graphics2D[src]

pub fn add_textured_object<'o, O, V, I>(
    &mut self,
    object: &'o O,
    texture: Texture
) -> Option<usize> where
    O: DependentObject<'o, TexturedVertex2D, u8, Vertices = V, Indices = I>,
    V: AsRef<[TexturedVertex2D]> + 'o,
    I: AsRef<[u8]> + 'o, 
[src]

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

Adds the simple object to the array.

pub fn delete_last_textured_object(&mut self)[src]

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

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

pub fn clear_textured_object_array(&mut self)[src]

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

Clears the object array.

pub fn get_textured_object_colour(&mut self, index: usize) -> &mut Colour[src]

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

Returns a reference to the object's colour.

pub fn get_textured_object_texture(&mut self, index: usize) -> &mut Texture[src]

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

Returns a reference to the object's texture.

pub fn set_textured_object_colour(&mut self, index: usize, colour: Colour)[src]

Устанавливает цвет объекта.

Паникует, если нет такого объекта.

Sets the colour of the object.

Panics if there is no such object.

pub fn set_textured_object_primitive_type(
    &mut self,
    index: usize,
    primitive_type: PrimitiveType
)
[src]

Устанавливает тип отрисовки объекта.

Паникует, если нет такого объекта.

Sets the primitive type of the object.

Panics if there is no such object.

pub fn rewrite_textured_object_vertices(
    &mut self,
    index: usize,
    vertices: &[TexturedVertex2D]
)
[src]

Переписывает вершины объекта.

Паникует, если нет такого объекта или размер vertices отличается от установленного.

Rewrites vertices of the object.

Panics if there is no such object or the vertices size differs from the set.

pub fn rewrite_textured_object_indices(&mut self, index: usize, indices: &[u8])[src]

Переписывает индексы объекта.

Паникует, если нет такого объекта или размер indices отличается от установленного.

Rewrites indices of the object.

Panics if there is no such object or the indices size differs from the set.

impl Graphics2D[src]

pub fn add_font(&mut self, font: Font<'static>) -> Option<usize>[src]

Добавляет шрифт в массив.

Adds a font to the array.

pub fn get_font(&self, index: usize) -> &Font<'static>[src]

Возращает шрифт.

Returns a font.

pub fn add_text_object(
    &mut self,
    text: String,
    text_base: &TextBase,
    font: usize
) -> Option<usize>
[src]

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

Adds a text object to the array.

pub fn delete_last_text_object(&mut self)[src]

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

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

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.