pixbuf_get_from_surface
Description:
[ Version ( deprecated = true , deprecated_since = "4.12" ) ]
public Pixbuf? pixbuf_get_from_surface (Surface surface, int src_x, int src_y, int width, int height)
Warning: pixbuf_get_from_surface is deprecated since 4.12.
Transfers image data from a `cairo_surface_t` and converts it to a `GdkPixbuf`.
Note:
Use [class@Gdk.Texture] and subclasses instead cairo surfaces and pixbufs
This allows you to efficiently read individual pixels from cairo surfaces.
This function will create an RGB pixbuf with 8 bits per channel. The pixbuf will contain an alpha channel if the surface
contains
one.
Parameters:
surface |
surface to copy from |
src_x |
Source X coordinate within |
src_y |
Source Y coordinate within |
width |
Width in pixels of region to get |
height |
Height in pixels of region to get |
Returns:
A newly-created pixbuf with a reference count of 1 |
Namespace: Gdk
Package: gtk4