Skip to main content

render_region

Function render_region 

Source
pub fn render_region(
    list: &DisplayList,
    vp_x: f64,
    vp_y: f64,
    vp_w: f64,
    vp_h: f64,
    pixel_w: u32,
    pixel_h: u32,
    dpi: f64,
    icc: Option<&IccCache>,
    image_cache: Option<&ImageCache>,
    no_aa: bool,
) -> Vec<u8> 
Expand description

Render a rectangular viewport region of a display list to RGBA pixels.

  • list: The display list to render (in device-space coordinates at the reference DPI)
  • vp_x, vp_y, vp_w, vp_h: Viewport rectangle in device-space pixels
  • pixel_w, pixel_h: Output pixel dimensions
  • dpi: Reference DPI (for hairline width decisions)

Returns RGBA pixel data of size pixel_w × pixel_h × 4.