[−][src]Struct cat_engine::image::ImageBase
Основа для изображений (текстур). Image (texture) base.
Прямоугольник с вершинами: (x1, y1), (x1, y2), (x2, y1), (x2, y2).
Цветовой фильтр - [red, green, blue, alpha]. Цвет = цвет * фильтр.
Изменённая система координат - начало в центре окна, ось Y инвертирована.
Rectangle with vertexes: (x1, y1), (x1, y2), (x2, y1), (x2, y2).
Colour filter - [red, green, blue, alpha]. Colour = colour * filter.
The coordinate system is changed: the origin is at the center of the window, the Y axe is reversed.
Fields
x1: f32
y1: f32
x2: f32
y2: f32
colour_filter: Colour
Implementations
impl ImageBase
[src]
pub fn new(colour_filter: Colour, rect: [f32; 4]) -> ImageBase
[src]
rect with the common coordinate system- [x,y,width,height]
pub fn set_rect(&mut self, rect: [f32; 4])
[src]
rect with the common coordinate system - [x,y,width,height]
pub fn shift(&mut self, [dx, dy]: [f32; 2])
[src]
Сдвигает координаты.
Shifts coordinates.
pub fn draw(
&self,
texture: &Texture,
draw_parameters: &mut DrawParameters,
graphics: &mut Graphics
)
[src]
&self,
texture: &Texture,
draw_parameters: &mut DrawParameters,
graphics: &mut Graphics
)
Рисует изображение.
Draws the image.
pub fn draw_shift(
&self,
texture: &Texture,
shift: [f32; 2],
draw_parameters: &mut DrawParameters,
graphics: &mut Graphics
)
[src]
&self,
texture: &Texture,
shift: [f32; 2],
draw_parameters: &mut DrawParameters,
graphics: &mut Graphics
)
Рисует сдвинутое изображение.
Draws shifted image.
pub fn draw_rotate(
&self,
texture: &Texture,
angle: f32,
draw_parameters: &mut DrawParameters,
graphics: &mut Graphics
)
[src]
&self,
texture: &Texture,
angle: f32,
draw_parameters: &mut DrawParameters,
graphics: &mut Graphics
)
Рисует изображение под углом.
Draws rotated image.
Trait Implementations
Auto Trait Implementations
impl RefUnwindSafe for ImageBase
impl Send for ImageBase
impl Sync for ImageBase
impl Unpin for ImageBase
impl UnwindSafe for ImageBase
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> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
fn to_owned(&self) -> T
[src]
fn clone_into(&self, target: &mut T)
[src]
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>,