Class (GI Struct)

Gdk-4.0GdkTextureDownloaderSince 4.10

Used to download the contents of a Gdk.Texture.

It is intended to be created as a short-term object for a single download, but can be used for multiple downloads of different textures or with different settings.

Gdk.TextureDownloader can be used to convert data between different formats. Create a Gdk.Texture for the existing format and then download it in a different format.

4.10

Index

Constructors

Properties

Methods

  • Downloads the given texture pixels into a GLib.Bytes. The offsets and strides of the resulting buffer will be stored in the respective values.

    If the format does have less than 4 planes, the remaining offsets and strides will be set to 0.

    Returns [GLib.Bytes, number[], number[]]

    The downloaded pixels

  • Downloads the texture into local memory.

    This function cannot be used with a multiplanar format.

    Parameters

    • data: string | Uint8Array<ArrayBufferLike>

      pointer to enough memory to be filled with the downloaded data of the texture

    • stride: number

      rowstride in bytes

    Returns void