Flags

Details

class GdkPixdata.PixdataDumpType(value)

Bases: GLib.Flags

An enumeration which is used by GdkPixdata.Pixdata.to_csource() to determine the form of C source to be generated. The three values GdkPixdata.PixdataDumpType.PIXDATA_STREAM, GdkPixdata.PixdataDumpType.PIXDATA_STRUCT and GdkPixdata.PixdataDumpType.MACROS are mutually exclusive, as are GDK_PIXBUF_DUMP_GTYPES and GDK_PIXBUF_DUMP_CTYPES. The remaining elements are optional flags that can be freely added.

Deprecated since version 2.32.

GTYPES = 0

Generate GLib data types instead of standard C data types.

PIXDATA_STREAM = 0

Generate pixbuf data stream (a single string containing a serialized GdkPixdata.Pixdata structure in network byte order).

PIXDATA_STRUCT = 1

Generate GdkPixdata.Pixdata structure (needs the GdkPixdata.Pixdata structure definition from gdk-pixdata.h).

CONST = 1024

Generate const symbols.

MACROS = 2

Generate *_ROWSTRIDE, *_WIDTH, *_HEIGHT, *_BYTES_PER_PIXEL and *_RLE_PIXEL_DATA or *_PIXEL_DATA macro definitions for the image.

CTYPES = 256

Generate standard C data types instead of GLib data types.

STATIC = 512

Generate static symbols.

RLE_DECODER = 65536

Provide a *_RUN_LENGTH_DECODE(image_buf, rle_data, size, bpp) macro definition to decode run-length encoded image data.

class GdkPixdata.PixdataType(value)

Bases: GLib.Flags

An enumeration containing three sets of flags for a GdkPixdata.Pixdata struct: one for the used colorspace, one for the width of the samples and one for the encoding of the pixel data.

Deprecated since version 2.32.

COLOR_TYPE_RGB = 1

each pixel has red, green and blue samples.

ENCODING_RAW = 16777216

the pixel data is in raw form.

COLOR_TYPE_RGBA = 2

each pixel has red, green and blue samples and an alpha value.

ENCODING_MASK = 251658240

mask for the encoding flags of the enum.

COLOR_TYPE_MASK = 255

mask for the colortype flags of the enum.

ENCODING_RLE = 33554432

the pixel data is run-length encoded. Runs may be up to 127 bytes long; their length is stored in a single byte preceding the pixel data for the run. If a run is constant, its length byte has the high bit set and the pixel data consists of a single pixel which must be repeated.

SAMPLE_WIDTH_8 = 65536

each sample has 8 bits.

SAMPLE_WIDTH_MASK = 983040

mask for the sample width flags of the enum.