Package: gdk

GEnum gdk:memory-format

Declaration

(gobject:define-genum "GdkMemoryFormat" memory-format
  (:export t
   :type-initializer "gdk_memory_format_get_type")
  :B8G8R8A8-PREMULTIPLIED
  :A8R8G8B8-PREMULTIPLIED
  :R8G8B8A8-PREMULTIPLIED
  :B8G8R8A8
  :A8R8G8B8
  :R8G8B8A8
  :A8B8G8R8
  :R8G8B8
  :B8G8R8
  :R16G16B16
  :R16G16B16A16-PREMULTIPLIED
  :R16G16B16A16
  :R16G16B16-FLOAT
  :R16G16B16A16-FLOAT-PREMULTIPLIED
  :R16G16B16A16-FLOAT
  :R32G32B32-FLOAT
  :R32G32B32A32-FLOAT-PREMULTIPLIED
  :R32G32B32A32-FLOAT
  :N-FORMATS)  

Values

: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. Since 4.6
:R16G16B16A16-PREMULTIPLIED
4 guint16 values; for red, green, blue, alpha. The color values are premultiplied with the alpha value. Since 4.6
:R16G16B16A16
4 guint16 values; for red, green, blue, alpha. Since 4.6
:R16G16B16-FLOAT
3 half-float values; for red, green, blue. The data is opaque. Since 4.6
:R16G16B16A16-FLOAT-PREMULTIPLIED
4 half-float values; for red, green, blue and alpha. The color values are premultiplied with the alpha value. Since 4.6
:R16G16B16A16-FLOAT
4 half-float values; for red, green, blue and alpha. Since 4.6
:R32G32B32-FLOAT
No description available.
:R32G32B32A32-FLOAT-PREMULTIPLIED
4 float values; for red, green, blue and alpha. The color values are premultiplied with the alpha value. Since 4.6
:R32G32B32A32-FLOAT
4 float values; for red, green, blue and alpha. Since 4.6
:N-FORMATS
The number of formats. This value will change as more formats get added, so do not rely on its concrete integer.

Details

The gdk:memory-format enumeration describes a format that bytes can have in memory. It describes formats by listing the contents of the memory passed to it. So :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 the :argb32 value of the cairo:format-t enumeration is represented by different gdk:memory-format values on architectures with different endiannesses.

Its naming is modelled after VkFormat. See https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.htmlVkFormat for details.
 

See also

#2023-4-12