gtkWidgetGetSnapshot: gtkWidgetGetSnapshot

Description Usage Arguments Details Value Author(s)

View source: R/gtkFuncs.R

Description

Create a GdkPixmap of the contents of the widget and its children.

Usage

1
gtkWidgetGetSnapshot(object, clip.rect = NULL)

Arguments

object

a GtkWidget

clip.rect

a GdkRectangle or NULL. [ allow-none ]

Details

Works even if the widget is obscured. The depth and visual of the resulting pixmap is dependent on the widget being snapshot and likely differs from those of a target widget displaying the pixmap. The function gdkPixbufGetFromDrawable can be used to convert the pixmap to a visual independant representation.

The snapshot area used by this function is the widget's allocation plus any extra space occupied by additional windows belonging to this widget (such as the arrows of a spin button). Thus, the resulting snapshot pixmap is possibly larger than the allocation.

If clip.rect is non-NULL, the resulting pixmap is shrunken to match the specified clip_rect. The (x,y) coordinates of clip.rect are interpreted widget relative. If width or height of clip.rect are 0 or negative, the width or height of the resulting pixmap will be shrunken by the respective amount. For instance a clip.rect { +5, +5, -10, -10 } will chop off 5 pixels at each side of the snapshot pixmap. If non-NULL, clip.rect will contain the exact widget-relative snapshot coordinates upon return. A clip.rect of { -1, -1, 0, 0 } can be used to preserve the auto-grown snapshot area and use clip.rect as a pure output parameter.

The returned pixmap can be NULL, if the resulting clip.area was empty. Since 2.14

Value

[GdkPixmap] GdkPixmap snapshot of the widget

Author(s)

Derived by RGtkGen from GTK+ documentation


RGtk2 documentation built on Oct. 14, 2021, 5:08 p.m.