///
/// Creates and returns a mask for this image based on the given *color* value. If the *mode* is MaskInColor (the default value),
/// all pixels matching *color* will be opaque pixels in the mask. If
/// *mode* is MaskOutColor, all pixels matching the given color will
/// be transparent.
///
/// **See also:** [`create_alpha_mask()`]
/// [`create_heuristic_mask()`]
///
/// Qt::TransformationMode transformMode) const
/// **Overloads**
/// Returns a copy of the image scaled to a rectangle with the given
/// *width* and *height* according to the given *aspectRatioMode*
/// and *transformMode.*
///
/// If either the *width* or the *height* is zero or negative, this
/// function returns a null image.
///
/// Qt::TransformationMode transformMode) const
///
/// Returns a copy of the image scaled to a rectangle defined by the
/// given *size* according to the given *aspectRatioMode* and *transformMode.*
///
/// ![qimage-scaling.png](qimage-scaling.png)
///
/// * If *aspectRatioMode* is Qt::IgnoreAspectRatio, the image is scaled to *size.*
/// * If *aspectRatioMode* is Qt::KeepAspectRatio, the image is scaled to a rectangle as large as possible inside *size,* preserving the aspect ratio.
/// * If *aspectRatioMode* is Qt::KeepAspectRatioByExpanding, the image is scaled to a rectangle as small as possible outside *size,* preserving the aspect ratio.
///
/// If the given *size* is empty, this function returns a null image.
///
/// **See also:** [`is_null()`]
/// {QImage#Image Transformations}{Image
/// Transformations}
///
/// Returns a scaled copy of the image. The returned image is scaled
/// to the given *width* using the specified transformation *mode.*
///
/// This function automatically calculates the height of the image so
/// that its aspect ratio is preserved.
///
/// If the given *width* is 0 or negative, a null image is returned.
///
/// **See also:** {QImage#Image Transformations}{Image Transformations}
///
/// Returns a scaled copy of the image. The returned image is scaled
/// to the given *height* using the specified transformation *mode.*
///
/// This function automatically calculates the width of the image so that
/// the ratio of the image is preserved.
///
/// If the given *height* is 0 or negative, a null image is returned.
///
/// **See also:** {QImage#Image Transformations}{Image Transformations}
Creates and returns a mask for this image based on the given *color* value. If the *mode* is MaskInColor (the default value),
all pixels matching *color* will be opaque pixels in the mask. If
mode* is MaskOutColor, all pixels matching the given color will
be transparent.





If either the *width* or the *height* is zero or negative, this
function returns a null image.







If *aspectRatioMode* is Qt::IgnoreAspectRatio, the image is scaled to *size.
If *aspectRatioMode* is Qt::KeepAspectRatio, the image is scaled to a rectangle as large as possible inside *size,* preserving the aspect ratio.
If *aspectRatioMode* is Qt::KeepAspectRatioByExpanding, the image is scaled to a rectangle as small as possible outside *size,* preserving the aspect ratio.

If the given *size* is empty, this function returns a null image.



Returns a scaled copy of the image. The returned image is scaled
to the given *width* using the specified transformation *mode.

This function automatically calculates the height of the image so
that its aspect ratio is preserved.

If the given *width* is 0 or negative, a null image is returned.

See also:** {QImage#Image Transformations}{Image Transformations}

Returns a scaled copy of the image. The returned image is scaled
to the given *height* using the specified transformation *mode.

This function automatically calculates the width of the image so that
the ratio of the image is preserved.

If the given *height* is 0 or negative, a null image is returned.

See also:** {QImage#Image Transformations}{Image Transformations}
Creates and returns a mask for this image based on the given * color * value . If the * mode * is MaskInColor ( the default value ) all pixels matching * color * will be opaque pixels in the mask . If mode * is MaskOutColor all pixels matching the given color will be transparent . If either the * width * or the * height * is zero or negative this function returns a null image . If * aspectRatioMode * is Qt :: IgnoreAspectRatio the image is scaled to * size . If * aspectRatioMode * is Qt :: KeepAspectRatio the image is scaled to a rectangle as large as possible inside * size * preserving the aspect ratio . If * aspectRatioMode * is Qt :: KeepAspectRatioByExpanding the image is scaled to a rectangle as small as possible outside * size * preserving the aspect ratio . If the given * size * is empty this function returns a null image . Returns a scaled copy of the image . The returned image is scaled to the given * width * using the specified transformation * mode . This function automatically calculates the height of the image so that its aspect ratio is preserved . If the given * width * is 0 or negative a null image is returned . See also : ** { QImage#Image Transformations } { Image Transformations } Returns a scaled copy of the image . The returned image is scaled to the given * height * using the specified transformation * mode . This function automatically calculates the width of the image so that the ratio of the image is preserved . If the given * height * is 0 or negative a null image is returned . See also : ** { QImage#Image Transformations } { Image Transformations }
pub fn scaled(
        &self,
        w: i32,
        h: i32,
        aspect_mode: AspectRatioMode,
        mode: TransformationMode,
    ) -> Image {
        let enum_aspect_mode_3 = aspect_mode as u32;
        let enum_mode_4 = mode as u32;
        let (obj_data, funcs) = self.get_image_obj_funcs();
        unsafe {
            let ret_val = ((*funcs).scaled)(obj_data, w, h, enum_aspect_mode_3, enum_mode_4);
            let t = ret_val;
            let ret_val;
            if t.host_data != ::std::ptr::null() {
                ret_val = Image::new_from_rc(t);
            } else {
                ret_val = Image::new_from_owned(t);
            }
            ret_val
        }
    }
pub fn scaled ( & self , w : i32 , h : i32 , aspect_mode : AspectRatioMode , mode : TransformationMode , ) -> Image { let enum_aspect_mode_3 = aspect_mode as u32 ; let enum_mode_4 = mode as u32 ; let ( obj_data , funcs ) = self . get_image_obj_funcs ( ) ; unsafe { let ret_val = ( ( * funcs ) . scaled ) ( obj_data , w , h , enum_aspect_mode_3 , enum_mode_4 ) ; let t = ret_val ; let ret_val ; if t . host_data != :: std :: ptr :: null ( ) { ret_val = Image :: new_from_rc ( t ) ; } else { ret_val = Image :: new_from_owned ( t ) ; } ret_val } }
Creates and returns a mask for this image based on the given *color* value.
Creates and returns a mask for this image based on the given * color * value .
&self
w
i32
h
i32
aspect_mode
AspectRatioMode
mode
TransformationMode