Used to download the contents of a <GdkTexture>.
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.
<GdkTextureDownloader> can be used to
convert data between different formats. Create a
<GdkTexture> for the existing format and then
download it in a different format.
Creates a copy of the downloader.
This function is meant for language bindings.
Passed: a <GdkTextureDownloader>.
the downloader to copy
Returned: a <GdkTextureDownloader>.
A copy of the downloader
Downloads the given texture pixels into a
<GBytes>. The rowstride will be stored in the
stride value.
This function will abort if it tries to download a large texture and
fails to allocate memory. If you think that may happen, you should
handle memory allocation yourself and use texture-downloader:download-into once allocation
succeeded.
This function cannot be used with a multiplanar format. Use
texture-downloader:download-bytes-with-planes!
for that purpose.
Passed: a <GdkTextureDownloader>.
the downloader
Returned: a <GBytes>.
The downloaded pixels
Returned: an unsigned 64-bit integer.
The stride of the resulting data in bytes
Downloads the given texture pixels into a
<GBytes>. 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.
Passed: a <GdkTextureDownloader>.
the downloader
Passed: an u64vector, or a list or vector, each an unsigned 64-bit integer. It is filled in, and returned: an u64vector.
The offsets of the resulting data planes in bytes
Passed: an u64vector, or a list or vector, each an unsigned 64-bit integer. It is filled in, and returned: an u64vector.
The stride of the resulting data planes in bytes
Returned: a <GBytes>.
The downloaded pixels
Downloads the texture into local memory.
This function cannot be used with a multiplanar format.
Passed: a <GdkTextureDownloader>.
a texture downloader
Passed: a foreign pointer, or a bytevector.
pointer to enough memory to be filled with the downloaded data of the texture
Passed: an unsigned 64-bit integer.
rowstride in bytes
Frees the given downloader and all its associated resources.
Passed: a <GdkTextureDownloader>.
texture downloader to free
Gets the color state that the data will be downloaded in.
Passed: a <GdkTextureDownloader>.
a texture downloader
Returned: a <GdkColorState>.
The color state of the download
Gets the format that the data will be downloaded in.
Passed: a <GdkTextureDownloader>.
a texture downloader
Returned: a <GdkMemoryFormat>.
The format of the download
Gets the texture that the downloader will download.
Passed: a <GdkTextureDownloader>.
a texture downloader
Returned: a <GdkTexture>.
The texture to download
Creates a new texture downloader for texture.
By default, the downloader will convert the data to the default memory format, and to the sRGB color state.
Passed: a <GdkTexture>.
texture to download
Returned: a <GdkTextureDownloader>.
A new texture downloader
Sets the color state the downloader will convert the data to.
By default, the sRGB colorstate returned by ColorState.get_srgb
is used.
Passed: a <GdkTextureDownloader>.
a texture downloader
Passed: a <GdkColorState>.
the color state to use
Sets the format the downloader will download.
By default, GDK_MEMORY_DEFAULT is set.
Passed: a <GdkTextureDownloader>.
a texture downloader
Passed: a <GdkMemoryFormat>, or one of its
symbols.
the format to use
Changes the texture the downloader will download.
Passed: a <GdkTextureDownloader>.
a texture downloader
Passed: a <GdkTexture>.
the new texture to download