pub struct Quad(/* private fields */);
Implementations§
Source§impl 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 Freeze for Quad
impl RefUnwindSafe for Quad
impl Send for Quad
impl Sync for Quad
impl Unpin for Quad
impl UnwindSafe for Quad
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
Source§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 moreSource§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).Source§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.Source§fn from_subset(element: &SS) -> SP
fn from_subset(element: &SS) -> SP
The inclusion map: converts
self
to the equivalent element of its superset.