Enum gdk4::MemoryFormat [−][src]
#[non_exhaustive]
pub enum MemoryFormat {
B8g8r8a8Premultiplied,
A8r8g8b8Premultiplied,
R8g8b8a8Premultiplied,
B8g8r8a8,
A8r8g8b8,
R8g8b8a8,
A8b8g8r8,
R8g8b8,
B8g8r8,
NFormats,
// some variants omitted
}
Expand description
MemoryFormat
describes a format that bytes can have in memory.
It describes formats by listing the contents of the memory passed to it.
So GDK_MEMORY_A8R8G8B8 will be 1 byte (8 bits) of alpha, followed by a
byte each of red, green and blue. It is not endian-dependent, so
CAIRO_FORMAT_ARGB32 is represented by different GdkMemoryFormats
on architectures with different endiannesses.
Its naming is modelled after VkFormat for details).
Variants (Non-exhaustive)
This enum is marked as non-exhaustive
4 bytes; for blue, green, red, alpha. The color values are premultiplied with the alpha value.
4 bytes; for alpha, red, green, blue. The color values are premultiplied with the alpha value.
4 bytes; for red, green, blue, alpha The color values are premultiplied with the alpha value.
4 bytes; for blue, green, red, alpha.
4 bytes; for alpha, red, green, blue.
4 bytes; for red, green, blue, alpha.
4 bytes; for alpha, blue, green, red.
3 bytes; for red, green, blue. The data is opaque.
3 bytes; for blue, green, red. The data is opaque.
The number of formats. This value will change as more formats get added, so do not rely on its concrete integer.
Trait Implementations
type Checker = GenericValueTypeChecker<Self>
type Checker = GenericValueTypeChecker<Self>
Value type checker.
Get the contained value from a Value
. Read more
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
This method tests less than (for self
and other
) and is used by the <
operator. Read more
This method tests less than or equal to (for self
and other
) and is used by the <=
operator. Read more
This method tests greater than (for self
and other
) and is used by the >
operator. Read more
Returns the type identifier of Self
.
Auto Trait Implementations
impl RefUnwindSafe for MemoryFormat
impl Send for MemoryFormat
impl Sync for MemoryFormat
impl Unpin for MemoryFormat
impl UnwindSafe for MemoryFormat
Blanket Implementations
Mutably borrows from an owned value. Read more
Returns a SendValue
clone of self
.