pub struct Tga<'a, C> { /* fields omitted */ }
Expand description
impl<'a, C> Tga<'a, C> where
C: PixelColor + From<<C as PixelColor>::Raw>,
[src]
Parses a TGA image from a byte slice.
If the bit depth of the source image does not match the bit depth of the output color type
C
, this method will return a ParseError::MismatchedBpp
error.
Converts a raw TGA object into a embedded-graphics TGA object.
If the bit depth of the source image does not match the bit depth of the output color type
C
, this method will return a ParseError::MismatchedBpp
error.
Returns a reference to the raw TGA image.
The RawTga
object can be used to access lower level details about the TGA file.
Returns an iterator over the pixels in this image.
Performs copy-assignment from source
. Read more
Formats the value using the given formatter. Read more
impl<C> ImageDrawable for Tga<'_, C> where
C: PixelColor + From<<C as PixelColor>::Raw>,
[src]
fn draw<D>(&self, target: &mut D) -> Result<(), D::Error> where
D: DrawTarget<Color = C>,
[src]
Draws the entire image to the target. Read more
fn draw_sub_image<D>(
&self,
target: &mut D,
area: &Rectangle
) -> Result<(), D::Error> where
D: DrawTarget<Color = Self::Color>,
[src]
Draws a part of the image to the target. Read more
#[must_use]
fn max(self, other: Self) -> Self
1.21.0[src]
Compares and returns the maximum of two values. Read more
#[must_use]
fn min(self, other: Self) -> Self
1.21.0[src]
Compares and returns the minimum of two values. Read more
#[must_use]
fn clamp(self, min: Self, max: Self) -> Self
1.50.0[src]
Restrict a value to a certain interval. Read more
impl<C> OriginDimensions for Tga<'_, C>
[src]
Returns the size of the bounding box.
This method tests for self
and other
values to be equal, and is used
by ==
. Read more
This method tests for !=
.
This method returns an ordering between self
and other
values if one exists. Read more
#[must_use]
fn lt(&self, other: &Rhs) -> bool
1.0.0[src]
This method tests less than (for self
and other
) and is used by the <
operator. Read more
#[must_use]
fn le(&self, other: &Rhs) -> bool
1.0.0[src]
This method tests less than or equal to (for self
and other
) and is used by the <=
operator. Read more
#[must_use]
fn gt(&self, other: &Rhs) -> bool
1.0.0[src]
This method tests greater than (for self
and other
) and is used by the >
operator. Read more
#[must_use]
fn ge(&self, other: &Rhs) -> bool
1.0.0[src]
This method tests greater than or equal to (for self
and other
) and is used by the >=
operator. Read more
Immutably borrows from an owned value. Read more
Mutably borrows from an owned value. Read more
impl<T> Dimensions for T where
T: OriginDimensions,
Returns the bounding box.
Returns a sub image of this image drawable. Read more
The type returned in the event of a conversion error.
The type returned in the event of a conversion error.