Package org.gnome.gdk
Enum Class MemoryFormat
- All Implemented Interfaces:
Enumeration
,Serializable
,Comparable<MemoryFormat>
,Constable
@Generated("io.github.jwharm.JavaGI")
public enum MemoryFormat
extends Enum<MemoryFormat>
implements Enumeration
GdkMemoryFormat
describes formats that image data 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).
-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>>
-
Enum Constant Summary
Enum ConstantDescriptionOne guint16 value; for alpha.One half-float value; for alpha.One float value; for alpha.One byte; for alpha.4 bytes; for alpha, blue, green, red.4 bytes; for alpha, blue, green, red, The color values are premultiplied with the alpha value.4 bytes; for alpha, red, green, blue.4 bytes; for alpha, red, green, blue.3 bytes; for blue, green, red.4 bytes; for blue, green, red, alpha.4 bytes; for blue, green, red, alpha.4 bytes; for blue, green, red, unused.One guint16 value; for grayscale.2 guint16 values; for grayscale, alpha.2 guint16 values; for grayscale, alpha.One byte; for grayscale.2 bytes; for grayscale, alpha.2 bytes; for grayscale, alpha.The number of formats.3 guint16 values; for red, green, blue.3 half-float values; for red, green, blue.4 guint16 values; for red, green, blue, alpha.4 half-float values; for red, green, blue and alpha.4 half-float values; for red, green, blue and alpha.4 guint16 values; for red, green, blue, alpha.3 float values; for red, green, blue.4 float values; for red, green, blue and alpha.4 float values; for red, green, blue and alpha.3 bytes; for red, green, blue.4 bytes; for red, green, blue, alpha.4 bytes; for red, green, blue, alpha The color values are premultiplied with the alpha value.4 bytes; for red, green, blue, unused.4 bytes; for unused, blue, green, red.4 bytes; for unused, red, green, blue. -
Method Summary
Modifier and TypeMethodDescriptionstatic Type
getType()
Get the GType of the MemoryFormat classint
getValue()
Get the numeric value of this enumstatic MemoryFormat
of
(int value) Create a new MemoryFormat for the provided valuestatic MemoryFormat
Returns the enum constant of this class with the specified name.static MemoryFormat[]
values()
Returns an array containing the constants of this enum class, in the order they are declared.
-
Enum Constant Details
-
B8G8R8A8_PREMULTIPLIED
4 bytes; for blue, green, red, alpha. The color values are premultiplied with the alpha value. -
A8R8G8B8_PREMULTIPLIED
4 bytes; for alpha, red, green, blue. The color values are premultiplied with the alpha value. -
R8G8B8A8_PREMULTIPLIED
4 bytes; for red, green, blue, alpha The color values are premultiplied with the alpha value. -
B8G8R8A8
4 bytes; for blue, green, red, alpha. -
A8R8G8B8
4 bytes; for alpha, red, green, blue. -
R8G8B8A8
4 bytes; for red, green, blue, alpha. -
A8B8G8R8
4 bytes; for alpha, blue, green, red. -
R8G8B8
3 bytes; for red, green, blue. The data is opaque. -
B8G8R8
3 bytes; for blue, green, red. The data is opaque. -
R16G16B16
3 guint16 values; for red, green, blue. -
R16G16B16A16_PREMULTIPLIED
4 guint16 values; for red, green, blue, alpha. The color values are premultiplied with the alpha value. -
R16G16B16A16
4 guint16 values; for red, green, blue, alpha. -
R16G16B16_FLOAT
3 half-float values; for red, green, blue. The data is opaque. -
R16G16B16A16_FLOAT_PREMULTIPLIED
4 half-float values; for red, green, blue and alpha. The color values are premultiplied with the alpha value. -
R16G16B16A16_FLOAT
4 half-float values; for red, green, blue and alpha. -
R32G32B32_FLOAT
3 float values; for red, green, blue. -
R32G32B32A32_FLOAT_PREMULTIPLIED
4 float values; for red, green, blue and alpha. The color values are premultiplied with the alpha value. -
R32G32B32A32_FLOAT
4 float values; for red, green, blue and alpha. -
G8A8_PREMULTIPLIED
2 bytes; for grayscale, alpha. The color values are premultiplied with the alpha value. -
G8A8
2 bytes; for grayscale, alpha. -
G8
One byte; for grayscale. The data is opaque. -
G16A16_PREMULTIPLIED
2 guint16 values; for grayscale, alpha. The color values are premultiplied with the alpha value. -
G16A16
2 guint16 values; for grayscale, alpha. -
G16
One guint16 value; for grayscale. The data is opaque. -
A8
One byte; for alpha. -
A16
One guint16 value; for alpha. -
A16_FLOAT
One half-float value; for alpha. -
A32_FLOAT
One float value; for alpha. -
A8B8G8R8_PREMULTIPLIED
4 bytes; for alpha, blue, green, red, The color values are premultiplied with the alpha value. -
B8G8R8X8
4 bytes; for blue, green, red, unused. -
X8R8G8B8
4 bytes; for unused, red, green, blue. -
R8G8B8X8
4 bytes; for red, green, blue, unused. -
X8B8G8R8
4 bytes; for unused, blue, green, red. -
N_FORMATS
The number of formats. This value will change as more formats get added, so do not rely on its concrete integer.
-
-
Method Details
-
values
Returns an array containing the constants of this enum class, in the order they are declared.- Returns:
- an array containing the constants of this enum class, in the order they are declared
-
valueOf
Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (Extraneous whitespace characters are not permitted.)- Parameters:
name
- the name of the enum constant to be returned.- Returns:
- the enum constant with the specified name
- Throws:
IllegalArgumentException
- if this enum class has no constant with the specified nameNullPointerException
- if the argument is null
-
of
Create a new MemoryFormat for the provided value- Parameters:
value
- the enum value- Returns:
- the enum for the provided value
-
getValue
public int getValue()Get the numeric value of this enum- Specified by:
getValue
in interfaceEnumeration
- Returns:
- the enum value
-
getType
-