pub struct BasicTexture<R: TextureRoot + Debug> {
pub inner: BasicAsset<BasicTexture<R>>,
pub graphics: Option<Rc<dyn Graphics>>,
pub root: R,
pub root_x: i32,
pub root_y: i32,
/* private fields */
}
Fields
inner: BasicAsset<BasicTexture<R>>
graphics: Option<Rc<dyn Graphics>>
root: R
root_x: i32
root_y: i32
Trait Implementations
sourceimpl<R: TextureRoot + Debug> AsRef<BasicAsset<BasicTexture<R>>> for BasicTexture<R>
impl<R: TextureRoot + Debug> AsRef<BasicAsset<BasicTexture<R>>> for BasicTexture<R>
sourcefn as_ref(&self) -> &BasicAsset<BasicTexture<R>>
fn as_ref(&self) -> &BasicAsset<BasicTexture<R>>
Converts this type into a shared reference of the (usually inferred) input type.
sourceimpl<R: TextureRoot + Debug> Asset for BasicTexture<R>
impl<R: TextureRoot + Debug> Asset for BasicTexture<R>
sourcefn reload_count(&self) -> usize
fn reload_count(&self) -> usize
The number of times this asset has been live-reloaded. Asset reloading is only enabled in debug builds, and only from the /assets directory. Read more
sourceimpl<R: Clone + TextureRoot + Debug> Clone for BasicTexture<R>
impl<R: Clone + TextureRoot + Debug> Clone for BasicTexture<R>
sourcefn clone(&self) -> BasicTexture<R>
fn clone(&self) -> BasicTexture<R>
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<R: Debug + TextureRoot + Debug> Debug for BasicTexture<R>
impl<R: Debug + TextureRoot + Debug> Debug for BasicTexture<R>
sourceimpl<R: Default + TextureRoot + Debug> Default for BasicTexture<R>
impl<R: Default + TextureRoot + Debug> Default for BasicTexture<R>
sourcefn default() -> BasicTexture<R>
fn default() -> BasicTexture<R>
Returns the “default value” for a type. Read more
sourceimpl<R: TextureRoot + Debug> Disposable for BasicTexture<R>
impl<R: TextureRoot + Debug> Disposable for BasicTexture<R>
sourceimpl<R: TextureRoot + Debug> SubTexture for BasicTexture<R>
impl<R: TextureRoot + Debug> SubTexture for BasicTexture<R>
sourceimpl<R: TextureRoot + Debug> Texture for BasicTexture<R>
impl<R: TextureRoot + Debug> Texture for BasicTexture<R>
sourcefn read_pixels(&self, x: i32, y: i32, width: i32, height: i32) -> Bytes
fn read_pixels(&self, x: i32, y: i32, width: i32, height: i32) -> Bytes
Reads pixels out from the given region. This is potentially a very SLOW operation, avoid overusing it. Read more
sourcefn split(&self, tiles_wide: i32, tiles_high: i32) -> Vec<Rc<dyn SubTexture>>ⓘNotable traits for Vec<u8, A>impl<A> Write for Vec<u8, A> where
A: Allocator,
fn split(&self, tiles_wide: i32, tiles_high: i32) -> Vec<Rc<dyn SubTexture>>ⓘNotable traits for Vec<u8, A>impl<A> Write for Vec<u8, A> where
A: Allocator,
A: Allocator,
Splits this texture into multiple tiles using sub_texture()
. Read more
sourcefn sub_texture(
&self,
x: i32,
y: i32,
width: i32,
height: i32
) -> Rc<dyn SubTexture>
fn sub_texture(
&self,
x: i32,
y: i32,
width: i32,
height: i32
) -> Rc<dyn SubTexture>
Creates a SubTexture that displays a region of this texture. Read more
Auto Trait Implementations
impl<R> !RefUnwindSafe for BasicTexture<R>
impl<R> !Send for BasicTexture<R>
impl<R> !Sync for BasicTexture<R>
impl<R> Unpin for BasicTexture<R> where
R: Unpin,
impl<R> !UnwindSafe for BasicTexture<R>
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
sourceimpl<Fr, To> IntoColor<To> for Fr where
To: FromColor<Fr>,
impl<Fr, To> IntoColor<To> for Fr where
To: FromColor<Fr>,
sourcefn into_color(self) -> To
fn into_color(self) -> To
Convert into color
impl<T> Pointable for T
impl<T> Pointable for T
impl<T> SetParameter for T
impl<T> SetParameter for T
fn set<T>(&mut self, value: T) -> <T as Parameter<Self>>::Result where
T: Parameter<Self>,
fn set<T>(&mut self, value: T) -> <T as Parameter<Self>>::Result where
T: Parameter<Self>,
Sets value
as a parameter of self
.