pub fn begin<P: PaintDeviceTrait<'a>>(&self, arg0: &P) -> bool {
        let (obj_arg0_1, _funcs) = arg0.get_paint_device_obj_funcs();

        let (obj_data, funcs) = self.get_painter_obj_funcs();
        unsafe {
            let ret_val = ((*funcs).begin)(obj_data, obj_arg0_1);
            ret_val
        }
    }
///
/// Begins painting the paint *device* and returns `true` if
/// successful; otherwise returns `false.`
///
/// Notice that all painter settings (setPen(), setBrush() etc.) are reset
/// to default values when begin() is called.
///
/// The errors that can occur are serious problems, such as these:
///
/// Note that most of the time, you can use one of the constructors
/// instead of begin(), and that end() is automatically done at
/// destruction.
///
/// **Warning**: A paint device can only be painted by one painter at a
/// time.
///
/// **Warning**: Painting on a QImage with the format
/// QImage::Format_Indexed8 is not supported.
///
/// **See also:** [`end()`]
/// [`q_painter()`]
///
/// Flushes the painting pipeline and prepares for the user issuing commands
/// directly to the underlying graphics context. Must be followed by a call to
/// endNativePainting().
///
/// Note that only the states the underlying paint engine changes will be reset
/// to their respective default states. The states we reset may change from
/// release to release. The following states are currently reset in the OpenGL
/// 2 engine:
///
/// * blending is disabled
/// * the depth, stencil and scissor tests are disabled
/// * the active texture unit is reset to 0
/// * the depth mask, depth function and the clear depth are reset to their default values
/// * the stencil mask, stencil operation and stencil function are reset to their default values
/// * the current color is reset to solid white
///
/// If, for example, the OpenGL polygon mode is changed by the user inside a
/// beginNativePaint()/endNativePainting() block, it will not be reset to the
/// default state by endNativePainting(). Here is an example that shows
/// intermixing of painter commands and raw OpenGL commands:
///
/// **See also:** [`end_native_painting()`]
Begins painting the paint *device* and returns `true` if
successful; otherwise returns `false.`

Notice that all painter settings (setPen(), setBrush() etc.) are reset
to default values when begin() is called.

The errors that can occur are serious problems, such as these.

Note that most of the time, you can use one of the constructors
instead of begin(), and that end() is automatically done at
destruction.

Warning**: A paint device can only be painted by one painter at a
time.

Warning**: Painting on a QImage with the format
QImage::Format_Indexed8 is not supported.



Flushes the painting pipeline and prepares for the user issuing commands
directly to the underlying graphics context. Must be followed by a call to
endNativePainting().

Note that only the states the underlying paint engine changes will be reset
to their respective default states. The states we reset may change from
release to release. The following states are currently reset in the OpenGL
2 engine.

blending is disabled
the depth, stencil and scissor tests are disabled
the active texture unit is reset to 0
the depth mask, depth function and the clear depth are reset to their default values
the stencil mask, stencil operation and stencil function are reset to their default values
the current color is reset to solid white

If, for example, the OpenGL polygon mode is changed by the user inside a
beginNativePaint()/endNativePainting() block, it will not be reset to the
default state by endNativePainting(). Here is an example that shows
intermixing of painter commands and raw OpenGL commands.


Begins painting the paint * device * and returns ` true ` if successful ; otherwise returns ` false . ` Notice that all painter settings ( setPen () setBrush () etc . ) are reset to default values when begin () is called . The errors that can occur are serious problems such as these . Note that most of the time you can use one of the constructors instead of begin () and that end () is automatically done at destruction . Warning ** : A paint device can only be painted by one painter at a time . Warning ** : Painting on a QImage with the format QImage :: Format_Indexed8 is not supported . Flushes the painting pipeline and prepares for the user issuing commands directly to the underlying graphics context . Must be followed by a call to endNativePainting () . Note that only the states the underlying paint engine changes will be reset to their respective default states . The states we reset may change from release to release . The following states are currently reset in the OpenGL 2 engine . blending is disabled the depth stencil and scissor tests are disabled the active texture unit is reset to 0 the depth mask depth function and the clear depth are reset to their default values the stencil mask stencil operation and stencil function are reset to their default values the current color is reset to solid white If for example the OpenGL polygon mode is changed by the user inside a beginNativePaint () / endNativePainting () block it will not be reset to the default state by endNativePainting () . Here is an example that shows intermixing of painter commands and raw OpenGL commands .
pub fn begin<P: PaintDeviceTrait<'a>>(&self, arg0: &P) -> bool {
        let (obj_arg0_1, _funcs) = arg0.get_paint_device_obj_funcs();
        let (obj_data, funcs) = self.get_painter_obj_funcs();
        unsafe {
            let ret_val = ((*funcs).begin)(obj_data, obj_arg0_1);
            ret_val
        }
    }
pub fn begin < P : PaintDeviceTrait < ' a > > ( & self , arg0 : & P ) -> bool { let ( obj_arg0_1 , _funcs ) = arg0 . get_paint_device_obj_funcs ( ) ; let ( obj_data , funcs ) = self . get_painter_obj_funcs ( ) ; unsafe { let ret_val = ( ( * funcs ) . begin ) ( obj_data , obj_arg0_1 ) ; ret_val } }
Begins painting the paint *device* and returns `true` if
successful; otherwise returns `false.`
Begins painting the paint * device * and returns ` true ` if successful ; otherwise returns ` false . `
&self
arg0
&P
&self
arg0
&P