Package: gdk

Function gdk-window-create-similar-surface

Lambda List

gdk-window-create-similar-surface (window content width height)

Arguments

window -- a gdk-window object to make the new surface similar to
content -- a value of the cairo-content-t enumeration for the content of the new surface
width -- an integer with the width of the new surface
height -- an integer with the height of the new surface

Return Value

A newly allocated cairo-surface-t instance. The caller owns the surface and should call the cairo-surface-destroy function when done with it. This function always returns a valid pointer, but it will return a "nil" surface if the surface is in an error state.

Details

Creates a new surface that is as compatible as possible with the given window. For example the new surface will have the same fallback resolution and font options as window. Generally, the new surface will also use the same backend as window, unless that is not possible for some reason. The type of the returned surface may be examined with the cairo-surface-get-type function.

Initially the surface contents are all 0, transparent if contents have transparency, black otherwise.
 

See also

*2021-12-11