gdk.texture
Module for [Texture] class
Types 3
gdk.texture.Texture is the basic element used to refer to pixel data.
It is primarily meant for pixel data that will not change over multiple frames, and will be used for a long time.
There are various ways to create gdk.texture.Texture objects from a gdkpixbuf.pixbuf.Pixbuf, or from bytes stored in memory, a file, or a gio.resource.Resource.
The ownership of the pixel data is transferred to the gdk.texture.Texture instance; you can only make a copy of it, via gdk.texture.Texture.download.
gdk.texture.Texture is an immutable object: That means you cannot change anything about it other than increasing the reference count via gobject.object.ObjectWrap.ref_, and consequently, it is a thread-safe object.
TextureGidBuilder builder() static nothrowGet builder for [gdk.texture.Texture] Returns: New builder objectgdk.texture.Texture newForPixbuf(gdkpixbuf.pixbuf.Pixbuf pixbuf) static nothrowCreates a new texture object representing the [gdkpixbuf.pixbuf.Pixbuf].gdk.texture.Texture newFromBytes(glib.bytes.Bytes bytes) staticCreates a new texture by loading an image from memory,gdk.texture.Texture newFromFile(gio.file.File file) staticCreates a new texture by loading an image from a file.gdk.texture.Texture newFromFilename(string path) staticCreates a new texture by loading an image from a file.gdk.texture.Texture newFromResource(string resourcePath) static nothrowCreates a new texture by loading an image from a resource.gdk.types.MemoryFormat getFormat() nothrowGets the memory format most closely associated with the data of the texture.int getHeight() nothrowReturns the height of the texture, in pixels. Returns: the height of the [gdk.texture.Texture]int getWidth() nothrowReturns the width of texture, in pixels. Returns: the width of the [gdk.texture.Texture]Fluent builder implementation template for gdk.texture.Texture
T height(int propval) nothrowSet `height` property. Params: propval = The height of the texture, in pixels. Returns: Builder instance for fluent chainingT width(int propval) nothrowSet `width` property. Params: propval = The width of the texture, in pixels. Returns: Builder instance for fluent chainingFluent builder for gdk.texture.Texture