Skip to main content

begin_group

Function begin_group 

Source
pub fn begin_group<P: Pixel>(
    parent: &Bitmap<P>,
    clip: &Clip,
    params: GroupParams,
) -> GroupBitmap<P>
Expand description

Open a new transparency group and return a group bitmap to render into.

  • parent is the current destination bitmap; its alpha plane is read when !params.isolated to initialise the group’s alpha.
  • The returned GroupBitmap becomes the new render target until paint_group or discard_group is called.

The group bounding box is clamped to parent dimensions; a zero-size bounding box (after clamping) is silently promoted to 1×1.

§Panics

Panics (in debug mode) if the bounding box is inverted (x_min > x_max or y_min > y_max).