///
/// Creates and returns a heuristic mask for this pixmap.
///
/// The function works by selecting a color from one of the corners
/// and then chipping away pixels of that color, starting at all the
/// edges. If *clipTight* is true (the default) the mask is just
/// large enough to cover the pixels; otherwise, the mask is larger
/// than the data pixels.
///
/// The mask may not be perfect but it should be reasonable, so you
/// can do things such as the following:
///
/// This function is slow because it involves converting to/from a
/// QImage, and non-trivial computations.
///
/// **See also:** [`Image::create_heuristic_mask`]
/// [`create_mask_from_color()`]
Creates and returns a heuristic mask for this pixmap.
The function works by selecting a color from one of the corners
and then chipping away pixels of that color, starting at all the
edges. If *clipTight* is true (the default) the mask is just
large enough to cover the pixels; otherwise, the mask is larger
than the data pixels.

The mask may not be perfect but it should be reasonable, so you
can do things such as the following.

This function is slow because it involves converting to/from a
QImage, and non-trivial computations.


Creates and returns a heuristic mask for this pixmap . The function works by selecting a color from one of the corners and then chipping away pixels of that color starting at all the edges . If * clipTight * is true ( the default ) the mask is just large enough to cover the pixels ; otherwise the mask is larger than the data pixels . The mask may not be perfect but it should be reasonable so you can do things such as the following . This function is slow because it involves converting to / from a QImage and non - trivial computations .
pub fn create_heuristic_mask(&self, clip_tight: bool) -> Bitmap {
        let (obj_data, funcs) = self.get_pixmap_obj_funcs();
        unsafe {
            let ret_val = ((*funcs).create_heuristic_mask)(obj_data, clip_tight);
            let t = ret_val;
            let ret_val;
            if t.host_data != ::std::ptr::null() {
                ret_val = Bitmap::new_from_rc(t);
            } else {
                ret_val = Bitmap::new_from_owned(t);
            }
            ret_val
        }
    }
pub fn create_heuristic_mask ( & self , clip_tight : bool ) -> Bitmap { let ( obj_data , funcs ) = self . get_pixmap_obj_funcs ( ) ; unsafe { let ret_val = ( ( * funcs ) . create_heuristic_mask ) ( obj_data , clip_tight ) ; let t = ret_val ; let ret_val ; if t . host_data != :: std :: ptr :: null ( ) { ret_val = Bitmap :: new_from_rc ( t ) ; } else { ret_val = Bitmap :: new_from_owned ( t ) ; } ret_val } }
Creates and returns a heuristic mask for this pixmap.
Creates and returns a heuristic mask for this pixmap .
&self
clip_tight
bool