Package: gtk

Function gtk-widget-draw

Lambda List

gtk-widget-draw (widget cr)

Arguments

widget -- the gtk-widget object to draw
cr -- a cairo-t Cairo context to draw to

Details

Draws the widget to a Cairo Context. The widget must be drawable, see the gtk-widget-is-drawable function, and a size must have been allocated. The top left corner of the widget will be drawn to the currently set origin point of the Cairo context.

You should pass a Cairo context as cr argument that is in an original state. Otherwise the resulting drawing is undefined. For example changing the operator using the cairo-set-operator function or the line width using the cairo-set-line-width function might have unwanted side effects. You may however change the transform matrix of the Cairo context - like with the cairo-scale, cairo-translate or cairo-set-matrix functions and clip region with the cairo-clip function prior to calling this function. Also, it is fine to modify the Cairo context with the cairo-save and cairo-push-group functions prior to calling this function.

Note

Special purpose widgets may contain special code for rendering to the screen and might appear differently on screen and when rendered using the gtk-widget-draw function.
 

See also

2021-9-16