Class

GdkTexture

Description [src]

abstract class Gdk.Texture : GObject.Object {
  /* No available fields */
}

GdkTexture 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 GdkTexture objects from a GdkPixbuf, or a Cairo surface, or other pixel data.

The ownership of the pixel data is transferred to the GdkTexture instance; you can only make a copy of it, via gdk_texture_download() or gdk_texture_download_float().

GdkTexture is an immutable object: That means you cannot change anything about it other than increasing the reference count via g_object_ref().

Hierarchy

hierarchy this GdkTexture implements_0 GdkPaintable this--implements_0 implements_1 GIcon this--implements_1 implements_2 GLoadableIcon this--implements_2 ancestor_0 GObject ancestor_0--this

Ancestors

Constructors

gdk_texture_new_for_pixbuf

Creates a new texture object representing the GdkPixbuf.

gdk_texture_new_from_bytes

Creates a new texture by loading an image from memory,

Available since: 4.6

gdk_texture_new_from_file

Creates a new texture by loading an image from a file.

gdk_texture_new_from_filename

Creates a new texture by loading an image from a file.

gdk_texture_new_from_resource

Creates a new texture by loading an image from a resource.

Instance methods

gdk_texture_download

Downloads the texture into local memory.

gdk_texture_download_float

Downloads the texture into local memory in a high dynamic range format.

Available since: 4.6

gdk_texture_get_height

Returns the height of the texture, in pixels.

gdk_texture_get_width

Returns the width of texture, in pixels.

gdk_texture_save_to_png

Store the given texture to the filename as a PNG file.

gdk_texture_save_to_png_bytes

Store the given texture in memory as a PNG file. Use gdk_texture_new_from_bytes() to read it back.

Available since: 4.6

gdk_texture_save_to_tiff

Store the given texture to the filename as a TIFF file.

Available since: 4.6

gdk_texture_save_to_tiff_bytes

Store the given texture in memory as a TIFF file.

Available since: 4.6

Methods inherited from GObject (42)
Methods inherited from GdkPaintable (9)
gdk_paintable_compute_concrete_size

Compute a concrete size for the GdkPaintable.

gdk_paintable_get_current_image

Gets an immutable paintable for the current contents displayed by paintable.

gdk_paintable_get_flags

Get flags for the paintable.

gdk_paintable_get_intrinsic_aspect_ratio

Gets the preferred aspect ratio the paintable would like to be displayed at.

gdk_paintable_get_intrinsic_height

Gets the preferred height the paintable would like to be displayed at.

gdk_paintable_get_intrinsic_width

Gets the preferred width the paintable would like to be displayed at.

gdk_paintable_invalidate_contents

Called by implementations of GdkPaintable to invalidate their contents.

gdk_paintable_invalidate_size

Called by implementations of GdkPaintable to invalidate their size.

gdk_paintable_snapshot

Snapshots the given paintable with the given width and height.

Properties

Gdk.Texture:height

The height of the texture, in pixels.

Gdk.Texture:width

The width of the texture, in pixels.

Signals

Signals inherited from GObject (1)
Signals inherited from GdkPaintable (2)
Gdk.Paintable::invalidate-contents

Emitted when the contents of the paintable change.

Gdk.Paintable::invalidate-size

Emitted when the intrinsic size of the paintable changes.

Class structure

struct GdkTextureClass {
  /* no available fields */
}