[][src]Function mupdf_sys::fz_round_rect

pub unsafe extern "C" fn fz_round_rect(rect: fz_rect) -> fz_irect

Round rectangle coordinates.

Coordinates in a bounding box are integers, so rounding of the rects coordinates takes place. The top left corner is rounded upwards and left while the bottom right corner is rounded downwards and to the right.

This differs from fz_irect_from_rect, in that fz_irect_from_rect slavishly follows the numbers (i.e any slight over/under calculations can cause whole extra pixels to be added). fz_round_rect allows for a small amount of rounding error when calculating the bbox.