gdkWindowBeginPaintRegion       package:RGtk2       R Documentation

_g_d_k_W_i_n_d_o_w_B_e_g_i_n_P_a_i_n_t_R_e_g_i_o_n

_D_e_s_c_r_i_p_t_i_o_n:

     Indicates that you are beginning the process of redrawing
     'region'. A backing store (offscreen buffer) large enough to
     contain 'region' will be created. The backing store will be
     initialized with the background color or background pixmap for
     'window'. Then, all drawing operations performed on 'window' will
     be diverted to the backing store.  When you call
     'gdkWindowEndPaint', the backing store will be copied to 'window',
     making it visible onscreen. Only the part of 'window' contained in
     'region' will be modified; that is, drawing operations are clipped
     to 'region'.

_U_s_a_g_e:

     gdkWindowBeginPaintRegion(object, region)

_A_r_g_u_m_e_n_t_s:

'object': ['GdkWindow']  a 'GdkWindow'

'region': ['GdkRegion']  region you intend to draw to

_D_e_t_a_i_l_s:

     The net result of all this is to remove flicker, because the user
     sees the finished product appear all at once when you call
     'gdkWindowEndPaint'. If you draw to 'window' directly without
     calling 'gdkWindowBeginPaintRegion', the user may see flicker as
     individual drawing operations are performed in sequence.  The
     clipping and background-initializing features of
     'gdkWindowBeginPaintRegion' are conveniences for the programmer,
     so you can avoid doing that work yourself.

     When using GTK+, the widget system automatically places calls to
     'gdkWindowBeginPaintRegion' and 'gdkWindowEndPaint' around
     emissions of the expose_event signal. That is, if you're writing
     an expose event handler, you can assume that the exposed area in
     'GdkEventExpose' has already been cleared to the window
     background, is already set as the clip region, and already has a
     backing store. Therefore in most cases, application code need not
     call 'gdkWindowBeginPaintRegion'. (You can disable the automatic
     calls around expose events on a widget-by-widget basis by calling
     'gtkWidgetSetDoubleBuffered'.)

     If you call this function multiple times before calling the
     matching 'gdkWindowEndPaint', the backing stores are pushed onto a
     stack. 'gdkWindowEndPaint' copies the topmost backing store
     onscreen, subtracts the topmost region from all other regions in
     the stack, and pops the stack. All drawing operations affect only
     the topmost backing store in the stack. One matching call to
     'gdkWindowEndPaint' is required for each call to
     'gdkWindowBeginPaintRegion'.

_A_u_t_h_o_r(_s):

     Derived by RGtkGen from GTK+ documentation

