Draws widget to cr. The top left corner of the widget will be drawn to the currently set origin point of cr.
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 cairo.context.Context.setOperator or the line width using cairo.context.Context.setLineWidth might have unwanted side effects. You may however change the context’s transform matrix - like with cairo.context.Context.scale, cairo.context.Context.translate or cairo.context.Context.setMatrix and clip region with cairo.context.Context.clip prior to calling this function. Also, it is fine to modify the context with cairo.context.Context.save and cairo.context.Context.pushGroup prior to calling this function.
Note that special-purpose widgets may contain special code for rendering to the screen and might appear differently on screen and when rendered using gtk.widget.Widget.draw.
a cairo context to draw to
Draws widget to cr. The top left corner of the widget will be drawn to the currently set origin point of cr.
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 cairo.context.Context.setOperator or the line width using cairo.context.Context.setLineWidth might have unwanted side effects. You may however change the context’s transform matrix - like with cairo.context.Context.scale, cairo.context.Context.translate or cairo.context.Context.setMatrix and clip region with cairo.context.Context.clip prior to calling this function. Also, it is fine to modify the context with cairo.context.Context.save and cairo.context.Context.pushGroup prior to calling this function.
Note that special-purpose widgets may contain special code for rendering to the screen and might appear differently on screen and when rendered using gtk.widget.Widget.draw.