pub struct PixelMetadata {
pub may_have_transparency: bool,
pub alpha_type: ImageAlphaType,
}Expand description
Metadata about the pixels of an image.
Fields§
§may_have_transparency: boolWhether the pixels may be non-opaque.
If unsure, always set this to true. Setting this to false is a strong guarantee that
every pixel in the image is guaranteed to be opaque. Setting this to false mistakenly
can lead to wrong rendering.
alpha_type: ImageAlphaTypeHow the alpha channel is represented.
Implementations§
Source§impl PixelMetadata
impl PixelMetadata
Sourcepub const fn new(
alpha_type: ImageAlphaType,
may_have_transparency: bool,
) -> PixelMetadata
pub const fn new( alpha_type: ImageAlphaType, may_have_transparency: bool, ) -> PixelMetadata
Create a new pixel metadata description.
Trait Implementations§
Source§impl Clone for PixelMetadata
impl Clone for PixelMetadata
Source§fn clone(&self) -> PixelMetadata
fn clone(&self) -> PixelMetadata
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreimpl Copy for PixelMetadata
Source§impl Debug for PixelMetadata
impl Debug for PixelMetadata
Source§impl Default for PixelMetadata
impl Default for PixelMetadata
Source§fn default() -> PixelMetadata
fn default() -> PixelMetadata
Returns the “default value” for a type. Read more
impl Eq for PixelMetadata
Source§impl PartialEq for PixelMetadata
impl PartialEq for PixelMetadata
impl StructuralPartialEq for PixelMetadata
Auto Trait Implementations§
impl Freeze for PixelMetadata
impl RefUnwindSafe for PixelMetadata
impl Send for PixelMetadata
impl Sync for PixelMetadata
impl Unpin for PixelMetadata
impl UnsafeUnpin for PixelMetadata
impl UnwindSafe for PixelMetadata
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<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.