Constructor

Gdk.MemoryTexture.new

Declaration [src]

GdkTexture*
gdk_memory_texture_new (
  int width,
  int height,
  GdkMemoryFormat format,
  GBytes* bytes,
  gsize stride
)

Description [src]

Creates a new texture for a blob of image data.

The GBytes must contain stride x height pixels in the given format.

Parameters

width int
 

the width of the texture

height int
 

the height of the texture

format GdkMemoryFormat
 

the format of the data

bytes GBytes*
 

the GBytes containing the pixel data

 Ownership is not transferred to the callee
stride gsize
 

rowstride for the data

Return value

Returns: GdkTexture

A newly-created GdkTexture

Ownership of the data is transferred to the caller