Struct storm::graphics::TextureSection
source · [−]Expand description
Token to reference a texture with. Has basic configuration settings.
Tuple Fields
0: Vector4<u16>
Implementations
sourceimpl TextureSection
impl TextureSection
sourcepub fn from_texture(
texture: &Texture,
left: u32,
right: u32,
top: u32,
bottom: u32
) -> TextureSection
pub fn from_texture(
texture: &Texture,
left: u32,
right: u32,
top: u32,
bottom: u32
) -> TextureSection
Coordinates relative to the top left corner of the texture. (0, 0) is the top left of the texture, and (width, height) is the bottom right of the texture.
sourcepub fn full() -> TextureSection
pub fn full() -> TextureSection
Creates a texture section that encompases the whole texture.
sourcepub fn mirror_y(&self) -> TextureSection
pub fn mirror_y(&self) -> TextureSection
Mirrors the texture along the Y axis. Creates a new texture.
sourcepub fn mirror_x(&self) -> TextureSection
pub fn mirror_x(&self) -> TextureSection
Mirrors the texture along the X axis. Creates a new texture.
Trait Implementations
sourceimpl Clone for TextureSection
impl Clone for TextureSection
sourcefn clone(&self) -> TextureSection
fn clone(&self) -> TextureSection
Returns a copy of the value. Read more
1.0.0 · sourcefn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source
. Read more
sourceimpl Debug for TextureSection
impl Debug for TextureSection
sourceimpl Default for TextureSection
impl Default for TextureSection
sourcefn default() -> TextureSection
fn default() -> TextureSection
Returns the “default value” for a type. Read more
sourceimpl PartialEq<TextureSection> for TextureSection
impl PartialEq<TextureSection> for TextureSection
sourcefn eq(&self, other: &TextureSection) -> bool
fn eq(&self, other: &TextureSection) -> bool
This method tests for self
and other
values to be equal, and is used
by ==
. Read more
sourcefn ne(&self, other: &TextureSection) -> bool
fn ne(&self, other: &TextureSection) -> bool
This method tests for !=
.
impl Copy for TextureSection
impl StructuralPartialEq for TextureSection
Auto Trait Implementations
impl RefUnwindSafe for TextureSection
impl Send for TextureSection
impl Sync for TextureSection
impl Unpin for TextureSection
impl UnwindSafe for TextureSection
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