pub(crate) fn fill_rect(
    rect: Rect,
    paint: &Paint,
    clip_mask: Option<&ClipMaskData>,
    pixmap: &mut PixmapMut,
) -> Option<()> {
    // TODO: ignore rects outside the pixmap

    // TODO: draw tiler
    let bbox = rect.round_out();
    if bbox.width() > MAX_DIM || bbox.height() > MAX_DIM {
        return None;
    }

    let clip = pixmap.size().to_screen_int_rect(0, 0);

    let mut blitter = RasterPipelineBlitter::new(paint, clip_mask, pixmap)?;

    if paint.anti_alias {
        scan::fill_rect_aa(&rect, &clip, &mut blitter)
    } else {
        scan::fill_rect(&rect, &clip, &mut blitter)
    }
}
/// Draws a filled rectangle onto the pixmap.
///
/// This function is usually slower than filling a rectangular path,
/// but it produces better results. Mainly it doesn't suffer from weird
/// clipping of horizontal/vertical edges.
///
/// Used mainly to render a pixmap onto a pixmap.
///
/// Returns `None` when there is nothing to fill or in case of a numeric overflow.
Draws a filled rectangle onto the pixmap.
This function is usually slower than filling a rectangular path,
but it produces better results. Mainly it doesn't suffer from weird
clipping of horizontal/vertical edges.

Used mainly to render a pixmap onto a pixmap.

Returns `None` when there is nothing to fill or in case of a numeric overflow.
Draws a filled rectangle onto the pixmap . This function is usually slower than filling a rectangular path but it produces better results . Mainly it doesn ' t suffer from weird clipping of horizontal / vertical edges . Used mainly to render a pixmap onto a pixmap . Returns ` None ` when there is nothing to fill or in case of a numeric overflow .
pub(crate) fn fill_rect(
    rect: Rect,
    paint: &Paint,
    clip_mask: Option<&ClipMaskData>,
    pixmap: &mut PixmapMut,
) -> Option<()> {
    // TODO: ignore rects outside the pixmap
    // TODO: draw tiler
    let bbox = rect.round_out();
    if bbox.width() > MAX_DIM || bbox.height() > MAX_DIM {
        return None;
    }
    let clip = pixmap.size().to_screen_int_rect(0, 0);
    let mut blitter = RasterPipelineBlitter::new(paint, clip_mask, pixmap)?;
    if paint.anti_alias {
        scan::fill_rect_aa(&rect, &clip, &mut blitter)
    } else {
        scan::fill_rect(&rect, &clip, &mut blitter)
    }
}
pub ( crate ) fn fill_rect ( rect : Rect , paint : & Paint , clip_mask : Option < & ClipMaskData > , pixmap : & mut PixmapMut , ) -> Option < ( ) > { // TODO: ignore rects outside the pixmap // TODO: draw tiler let bbox = rect . round_out ( ) ; if bbox . width ( ) > MAX_DIM || bbox . height ( ) > MAX_DIM { return None ; } let clip = pixmap . size ( ) . to_screen_int_rect ( 0 , 0 ) ; let mut blitter = RasterPipelineBlitter :: new ( paint , clip_mask , pixmap ) ? ; if paint . anti_alias { scan :: fill_rect_aa ( & rect , & clip , & mut blitter ) } else { scan :: fill_rect ( & rect , & clip , & mut blitter ) } }
Draws a filled rectangle onto the pixmap.
Draws a filled rectangle onto the pixmap .
rect
Rect
paint
&Paint
clip_mask
Option<&ClipMaskData>
pixmap
&mut PixmapMut