Struct moon_engine::renderer::Quad
source · [−]pub struct Quad(_);
Implementations
sourceimpl Quad
impl Quad
sourcepub fn new_from_position_and_rotation_and_size_and_color(
pos_x: f32,
pos_y: f32,
rotation: f32,
size_x: f32,
size_y: f32,
color: Color32
) -> Self
pub fn new_from_position_and_rotation_and_size_and_color(
pos_x: f32,
pos_y: f32,
rotation: f32,
size_x: f32,
size_y: f32,
color: Color32
) -> Self
Create a new Quad
from a given position, rotation, size and color.
sourcepub fn new_from_position_and_size_and_color(
pos_x: f32,
pos_y: f32,
size_x: f32,
size_y: f32,
color: Color32
) -> Self
pub fn new_from_position_and_size_and_color(
pos_x: f32,
pos_y: f32,
size_x: f32,
size_y: f32,
color: Color32
) -> Self
Create a new Quad
from a given position, size and color.
sourcepub fn new_from_position_and_size(
pos_x: f32,
pos_y: f32,
size_x: f32,
size_y: f32
) -> Self
pub fn new_from_position_and_size(
pos_x: f32,
pos_y: f32,
size_x: f32,
size_y: f32
) -> Self
Create a new Quad
from a given position and size.
sourcepub fn new_from_position_and_size_and_sprite(
pos_x: f32,
pos_y: f32,
size_x: f32,
size_y: f32,
sprite: &SubTexture
) -> Self
pub fn new_from_position_and_size_and_sprite(
pos_x: f32,
pos_y: f32,
size_x: f32,
size_y: f32,
sprite: &SubTexture
) -> Self
Create a new Quad
from a given position, size, and a reference to a SubTexture
.
sourcepub fn new_from_transform(transform: Transform) -> Self
pub fn new_from_transform(transform: Transform) -> Self
sourcepub fn new_from_transform_and_sprite(
transform: Transform,
sprite: &SubTexture
) -> Self
pub fn new_from_transform_and_sprite(
transform: Transform,
sprite: &SubTexture
) -> Self
Create a new Quad
using a given Transform
for its position and scale, and a reference to SubTexture
.
Trait Implementations
Auto Trait Implementations
impl RefUnwindSafe for Quad
impl Send for Quad
impl Sync for Quad
impl Unpin for Quad
impl UnwindSafe for Quad
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
impl<SS, SP> SupersetOf<SS> for SP where
SS: SubsetOf<SP>,
impl<SS, SP> SupersetOf<SS> for SP where
SS: SubsetOf<SP>,
fn to_subset(&self) -> Option<SS>
fn to_subset(&self) -> Option<SS>
The inverse inclusion map: attempts to construct self
from the equivalent element of its
superset. Read more
fn is_in_subset(&self) -> bool
fn is_in_subset(&self) -> bool
Checks if self
is actually part of its subset T
(and can be converted to it).
fn to_subset_unchecked(&self) -> SS
fn to_subset_unchecked(&self) -> SS
Use with care! Same as self.to_subset
but without any property checks. Always succeeds.
fn from_subset(element: &SS) -> SP
fn from_subset(element: &SS) -> SP
The inclusion map: converts self
to the equivalent element of its superset.