[−][src]Struct cat_engine::graphics::Graphics
Простой интерфейс для связи кадра и графических функций. Simple interface to connect graphics fuctions to the frame.
Fields
graphics2d: &'graphics mut Graphics2D
frame: &'frame mut Frame
Implementations
impl<'graphics, 'frame> Graphics<'graphics, 'frame>
[src]
pub fn clear_colour(&mut self, [r, g, b, a]: [f32; 4])
[src]
Заполняет окно данным цветом.
Fills the window with the given colour.
pub fn draw_object(
&mut self,
index: usize,
object_type: ObjectType,
draw_type: DrawType,
draw_parameters: &DrawParameters<'_>
) -> Result<(), DrawError>
[src]
&mut self,
index: usize,
object_type: ObjectType,
draw_type: DrawType,
draw_parameters: &DrawParameters<'_>
) -> Result<(), DrawError>
Рисует сохранённый объект.
Draws a saved object.
impl<'graphics, 'frame> Graphics<'graphics, 'frame>
[src]
pub fn draw_simple<'o, O, V, I>(
&mut self,
object: &'o O,
draw_parameters: &DrawParameters<'_>
) -> Result<(), DrawError> where
O: DependentObject<'o, Vertex2D, u8, Vertices = V, Indices = I>,
V: AsRef<[Vertex2D]> + 'o,
I: AsRef<[u8]> + 'o,
[src]
&mut self,
object: &'o O,
draw_parameters: &DrawParameters<'_>
) -> Result<(), DrawError> where
O: DependentObject<'o, Vertex2D, u8, Vertices = V, Indices = I>,
V: AsRef<[Vertex2D]> + 'o,
I: AsRef<[u8]> + 'o,
Рисует простой объект.
Draws a simple object.
pub fn draw_shift_simple<'o, O, V, I>(
&mut self,
object: &'o O,
shift: [f32; 2],
draw_parameters: &DrawParameters<'_>
) -> Result<(), DrawError> where
O: DependentObject<'o, Vertex2D, u8, Vertices = V, Indices = I>,
V: AsRef<[Vertex2D]> + 'o,
I: AsRef<[u8]> + 'o,
[src]
&mut self,
object: &'o O,
shift: [f32; 2],
draw_parameters: &DrawParameters<'_>
) -> Result<(), DrawError> where
O: DependentObject<'o, Vertex2D, u8, Vertices = V, Indices = I>,
V: AsRef<[Vertex2D]> + 'o,
I: AsRef<[u8]> + 'o,
Рисует сдвинутый простой объект.
Draws a shifted simple object.
pub fn draw_rotate_simple<'o, O, V, I>(
&mut self,
object: &'o O,
rotation_center: [f32; 2],
angle: f32,
draw_parameters: &DrawParameters<'_>
) -> Result<(), DrawError> where
O: DependentObject<'o, Vertex2D, u8, Vertices = V, Indices = I>,
V: AsRef<[Vertex2D]> + 'o,
I: AsRef<[u8]> + 'o,
[src]
&mut self,
object: &'o O,
rotation_center: [f32; 2],
angle: f32,
draw_parameters: &DrawParameters<'_>
) -> Result<(), DrawError> where
O: DependentObject<'o, Vertex2D, u8, Vertices = V, Indices = I>,
V: AsRef<[Vertex2D]> + 'o,
I: AsRef<[u8]> + 'o,
Рисует повёрнутый простой объект.
Draws a rotated simple object.
pub fn draw_simple_general<'o, O, V, I>(
&mut self,
object: &'o O,
draw_type: DrawType,
draw_parameters: &DrawParameters<'_>
) -> Result<(), DrawError> where
O: DependentObject<'o, Vertex2D, u8, Vertices = V, Indices = I>,
V: AsRef<[Vertex2D]> + 'o,
I: AsRef<[u8]> + 'o,
[src]
&mut self,
object: &'o O,
draw_type: DrawType,
draw_parameters: &DrawParameters<'_>
) -> Result<(), DrawError> where
O: DependentObject<'o, Vertex2D, u8, Vertices = V, Indices = I>,
V: AsRef<[Vertex2D]> + 'o,
I: AsRef<[u8]> + 'o,
Рисует простой объект.
Draws a simple object.
impl<'graphics, 'frame> Graphics<'graphics, 'frame>
[src]
pub fn draw_texture<'o, O, V, I>(
&mut self,
base: &'o O,
texture: &Texture,
draw_parameters: &DrawParameters<'_>
) -> Result<(), DrawError> where
O: DependentObject<'o, TexturedVertex2D, u8, Vertices = V, Indices = I>,
V: AsRef<[TexturedVertex2D]> + 'o,
I: AsRef<[u8]> + 'o,
[src]
&mut self,
base: &'o O,
texture: &Texture,
draw_parameters: &DrawParameters<'_>
) -> Result<(), DrawError> where
O: DependentObject<'o, TexturedVertex2D, u8, Vertices = V, Indices = I>,
V: AsRef<[TexturedVertex2D]> + 'o,
I: AsRef<[u8]> + 'o,
Рисует изображение.
Draws a texture.
pub fn draw_shift_texture<'o, O, V, I>(
&mut self,
base: &'o O,
texture: &Texture,
shift: [f32; 2],
draw_parameters: &DrawParameters<'_>
) -> Result<(), DrawError> where
O: DependentObject<'o, TexturedVertex2D, u8, Vertices = V, Indices = I>,
V: AsRef<[TexturedVertex2D]> + 'o,
I: AsRef<[u8]> + 'o,
[src]
&mut self,
base: &'o O,
texture: &Texture,
shift: [f32; 2],
draw_parameters: &DrawParameters<'_>
) -> Result<(), DrawError> where
O: DependentObject<'o, TexturedVertex2D, u8, Vertices = V, Indices = I>,
V: AsRef<[TexturedVertex2D]> + 'o,
I: AsRef<[u8]> + 'o,
Рисует сдвинутую текстуру.
Draws a shifted texture.
pub fn draw_rotate_texture<'o, O, V, I>(
&mut self,
base: &'o O,
texture: &Texture,
rotation_center: [f32; 2],
angle: f32,
draw_parameters: &DrawParameters<'_>
) -> Result<(), DrawError> where
O: DependentObject<'o, TexturedVertex2D, u8, Vertices = V, Indices = I>,
V: AsRef<[TexturedVertex2D]> + 'o,
I: AsRef<[u8]> + 'o,
[src]
&mut self,
base: &'o O,
texture: &Texture,
rotation_center: [f32; 2],
angle: f32,
draw_parameters: &DrawParameters<'_>
) -> Result<(), DrawError> where
O: DependentObject<'o, TexturedVertex2D, u8, Vertices = V, Indices = I>,
V: AsRef<[TexturedVertex2D]> + 'o,
I: AsRef<[u8]> + 'o,
Рисует повёрнутую текстуру.
Draws a rotated texture.
angle - radians
pub fn draw_texture_general<'o, O, V, I>(
&mut self,
base: &'o O,
texture: &Texture,
draw_type: DrawType,
draw_parameters: &DrawParameters<'_>
) -> Result<(), DrawError> where
O: DependentObject<'o, TexturedVertex2D, u8, Vertices = V, Indices = I>,
V: AsRef<[TexturedVertex2D]> + 'o,
I: AsRef<[u8]> + 'o,
[src]
&mut self,
base: &'o O,
texture: &Texture,
draw_type: DrawType,
draw_parameters: &DrawParameters<'_>
) -> Result<(), DrawError> where
O: DependentObject<'o, TexturedVertex2D, u8, Vertices = V, Indices = I>,
V: AsRef<[TexturedVertex2D]> + 'o,
I: AsRef<[u8]> + 'o,
Рисует текстуру.
Draws a texture.
impl<'graphics, 'frame> Graphics<'graphics, 'frame>
[src]
pub fn draw_glyph(
&mut self,
glyph: PositionedGlyph<'_>,
colour: Colour,
draw_parameters: &DrawParameters<'_>
) -> Result<(), DrawError>
[src]
&mut self,
glyph: PositionedGlyph<'_>,
colour: Colour,
draw_parameters: &DrawParameters<'_>
) -> Result<(), DrawError>
Выводит уже готовый символ.
Draws an already built glyph.
pub fn draw_shift_glyph(
&mut self,
glyph: PositionedGlyph<'_>,
colour: Colour,
shift: [f32; 2],
draw_parameters: &DrawParameters<'_>
) -> Result<(), DrawError>
[src]
&mut self,
glyph: PositionedGlyph<'_>,
colour: Colour,
shift: [f32; 2],
draw_parameters: &DrawParameters<'_>
) -> Result<(), DrawError>
Выводит сдвинутый, уже готовый символ.
Draws a shifted, already built glyph.
pub fn draw_rotate_glyph(
&mut self,
glyph: PositionedGlyph<'_>,
colour: Colour,
rotation_center: [f32; 2],
angle: f32,
draw_parameters: &DrawParameters<'_>
) -> Result<(), DrawError>
[src]
&mut self,
glyph: PositionedGlyph<'_>,
colour: Colour,
rotation_center: [f32; 2],
angle: f32,
draw_parameters: &DrawParameters<'_>
) -> Result<(), DrawError>
Выводит повёрнутый, уже готовый символ.
Draws a rotated, already built glyph.
pub fn draw_glyph_general(
&mut self,
glyph: PositionedGlyph<'_>,
colour: Colour,
draw_type: DrawType,
draw_parameters: &DrawParameters<'_>
) -> Result<(), DrawError>
[src]
&mut self,
glyph: PositionedGlyph<'_>,
colour: Colour,
draw_type: DrawType,
draw_parameters: &DrawParameters<'_>
) -> Result<(), DrawError>
Выводит уже готовый символ.
Draws a already built glyph.
impl<'graphics, 'frame> Graphics<'graphics, 'frame>
[src]
pub fn draw_simple_object(
&mut self,
index: usize,
draw_parameters: &DrawParameters<'_>
) -> Result<(), DrawError>
[src]
&mut self,
index: usize,
draw_parameters: &DrawParameters<'_>
) -> Result<(), DrawError>
Рисует простой объект.
Draws the saved simple object.
pub fn draw_shift_simple_object(
&mut self,
index: usize,
shift: [f32; 2],
draw_parameters: &DrawParameters<'_>
) -> Result<(), DrawError>
[src]
&mut self,
index: usize,
shift: [f32; 2],
draw_parameters: &DrawParameters<'_>
) -> Result<(), DrawError>
Рисует сдвинутый простой объект.
Draws the shifted saved simple object.
pub fn draw_rotate_simple_object(
&mut self,
index: usize,
rotation_center: [f32; 2],
angle: f32,
draw_parameters: &DrawParameters<'_>
) -> Result<(), DrawError>
[src]
&mut self,
index: usize,
rotation_center: [f32; 2],
angle: f32,
draw_parameters: &DrawParameters<'_>
) -> Result<(), DrawError>
Рисует повёрнутый простой объект.
Draws the rotated saved simple object.
pub fn draw_simple_object_general(
&mut self,
index: usize,
draw_type: DrawType,
draw_parameters: &DrawParameters<'_>
) -> Result<(), DrawError>
[src]
&mut self,
index: usize,
draw_type: DrawType,
draw_parameters: &DrawParameters<'_>
) -> Result<(), DrawError>
Рисует простой объект.
Draws the saved simple object.
impl<'graphics, 'frame> Graphics<'graphics, 'frame>
[src]
pub fn draw_textured_object(
&mut self,
index: usize,
draw_parameters: &DrawParameters<'_>
) -> Result<(), DrawError>
[src]
&mut self,
index: usize,
draw_parameters: &DrawParameters<'_>
) -> Result<(), DrawError>
Рисует сохранённый текстурный объект.
Draws the saved textured object.
pub fn draw_shift_textured_object(
&mut self,
index: usize,
shift: [f32; 2],
draw_parameters: &DrawParameters<'_>
) -> Result<(), DrawError>
[src]
&mut self,
index: usize,
shift: [f32; 2],
draw_parameters: &DrawParameters<'_>
) -> Result<(), DrawError>
Рисует сдвинутый сохранённый текстурный объект.
Draws the shifted saved textured object.
pub fn draw_rotate_textured_object(
&mut self,
index: usize,
rotation_center: [f32; 2],
angle: f32,
draw_parameters: &DrawParameters<'_>
) -> Result<(), DrawError>
[src]
&mut self,
index: usize,
rotation_center: [f32; 2],
angle: f32,
draw_parameters: &DrawParameters<'_>
) -> Result<(), DrawError>
Рисует повёрнутый сохранённый текстурный объект.
Draws the rotated saved textured object.
rotation_center - [x, y] angle - radians
pub fn draw_textured_object_general(
&mut self,
index: usize,
draw_type: DrawType,
draw_parameters: &DrawParameters<'_>
) -> Result<(), DrawError>
[src]
&mut self,
index: usize,
draw_type: DrawType,
draw_parameters: &DrawParameters<'_>
) -> Result<(), DrawError>
Рисует сохранённый текстурный объект.
Draws the saved textured object.
impl<'graphics, 'frame> Graphics<'graphics, 'frame>
[src]
pub fn draw_text_object(
&mut self,
index: usize,
draw_parameters: &DrawParameters<'_>
) -> Result<(), DrawError>
[src]
&mut self,
index: usize,
draw_parameters: &DrawParameters<'_>
) -> Result<(), DrawError>
Рисует сохранённый текстовой объект.
Draws the saved text object.
pub fn draw_shift_text_object(
&mut self,
index: usize,
shift: [f32; 2],
draw_parameters: &DrawParameters<'_>
) -> Result<(), DrawError>
[src]
&mut self,
index: usize,
shift: [f32; 2],
draw_parameters: &DrawParameters<'_>
) -> Result<(), DrawError>
Рисует сохранённый текстовой объект.
Draws the saved text object.
pub fn draw_rotate_text_object(
&mut self,
index: usize,
rotation_center: [f32; 2],
angle: f32,
draw_parameters: &DrawParameters<'_>
) -> Result<(), DrawError>
[src]
&mut self,
index: usize,
rotation_center: [f32; 2],
angle: f32,
draw_parameters: &DrawParameters<'_>
) -> Result<(), DrawError>
Рисует сохранённый текстовой объект.
Draws the saved text object.
pub fn draw_text_object_general(
&mut self,
index: usize,
draw_type: DrawType,
draw_parameters: &DrawParameters<'_>
) -> Result<(), DrawError>
[src]
&mut self,
index: usize,
draw_type: DrawType,
draw_parameters: &DrawParameters<'_>
) -> Result<(), DrawError>
Рисует сохранённый текстовой объект.
Draws the saved text object.
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]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> SetParameter for T
fn set<T>(&mut self, value: T) -> <T as Parameter<Self>>::Result where
T: Parameter<Self>,
T: Parameter<Self>,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,