Struct grafix_toolbox::lib::GL::tex::Image

source ·
pub struct Image<S, F> {
    pub w: u32,
    pub h: u32,
    pub data: Box<[F]>,
    pub s: Dummy<S>,
}

Fields§

§w: u32§h: u32§data: Box<[F]>§s: Dummy<S>

Implementations§

source§

impl<S: TexSize> Image<S, u8>

source

pub fn load(data: impl LoadArgs) -> Res<Self>

source

pub fn save(&self, name: impl AsRef<Path>)

source§

impl<S: TexSize, F: TexFmt> Image<S, F>

source

pub fn new<T>(size: T, data: impl Into<Box<[F]>>) -> Self
where uVec2: Cast<T>,

Trait Implementations§

source§

impl<S: Clone, F: Clone> Clone for Image<S, F>

source§

fn clone(&self) -> Image<S, F>

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl<S: Debug, F: Debug> Debug for Image<S, F>

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl<S: Default, F: Default> Default for Image<S, F>

source§

fn default() -> Image<S, F>

Returns the “default value” for a type. Read more
source§

impl<S: TexSize, F: TexFmt, RS, RF> From<&Tex<RS, RF, GL_TEXTURE_2D>> for Image<S, F>

source§

fn from(tex: &Tex2d<RS, RF>) -> Self

Converts to this type from the input type.
source§

impl<S: TexSize, F: TexFmt, RS, RF> From<Tex<RS, RF, GL_TEXTURE_2D>> for Image<S, F>

source§

fn from(tex: Tex2d<RS, RF>) -> Self

Converts to this type from the input type.
source§

impl<S: TexSize, F: TexFmt> PartialEq for Image<S, F>

source§

fn eq(&self, r: &Self) -> bool

This method tests for self and other values to be equal, and is used by ==.
1.0.0 · source§

fn ne(&self, other: &Rhs) -> bool

This method tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
source§

impl<S: TexSize, F: TexFmt> Tile<F> for Image<S, F>

source§

fn w(&self) -> i32

source§

fn h(&self) -> i32

source§

fn data(&self) -> &[F]

source§

impl<S: TexSize, F: TexFmt> Eq for Image<S, F>

Auto Trait Implementations§

§

impl<S, F> Freeze for Image<S, F>

§

impl<S, F> RefUnwindSafe for Image<S, F>

§

impl<S, F> Send for Image<S, F>
where S: Send, F: Send,

§

impl<S, F> Sync for Image<S, F>
where S: Sync, F: Sync,

§

impl<S, F> Unpin for Image<S, F>
where S: Unpin,

§

impl<S, F> UnwindSafe for Image<S, F>
where S: UnwindSafe, F: UnwindSafe,

Blanket Implementations§

source§

impl<T> Any for T
where T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> CloneToUninit for T
where T: Clone,

source§

default unsafe fn clone_to_uninit(&self, dst: *mut T)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dst. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

source§

impl<T> Instrument for T

source§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
source§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
source§

impl<T, U> Into<U> for T
where U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

source§

impl<A> MemoizedArgs<A> for A
where A: PartialEq + Clone,

source§

fn take(&self) -> A

source§

fn equal(&self, r: &A) -> bool

source§

impl<T> OrAssignment for T
where T: Default,

source§

fn or_def(self, filter: bool) -> T

source§

fn or_val(self, filter: bool, v: T) -> T

source§

impl<T> Same for T

§

type Output = T

Should always be Self
source§

impl<SS, SP> SupersetOf<SS> for SP
where SS: SubsetOf<SP>,

source§

fn to_subset(&self) -> Option<SS>

The inverse inclusion map: attempts to construct self from the equivalent element of its superset. Read more
source§

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

Use with care! Same as self.to_subset but without any property checks. Always succeeds.
source§

fn from_subset(element: &SS) -> SP

The inclusion map: converts self to the equivalent element of its superset.
source§

impl<T> ToOwned for T
where T: Clone,

§

type Owned = T

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
source§

impl<T> WithSubscriber for T

source§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
source§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more
source§

impl<T> Scalar for T
where T: 'static + Clone + PartialEq + Debug,

source§

impl<T> SendStat for T
where T: 'static + Send,