/* Check whether the given path contains a single rectangle.  */
cairo_bool_t _cairo_path_fixed_is_box(const cairo_path_fixed_t *path, cairo_box_t *box)
/* Check whether the given path contains a single rectangle.  */
cairo_bool_t _cairo_path_fixed_is_box(const cairo_path_fixed_t *path, cairo_box_t *box)
{
    const cairo_path_buf_t *buf;
    if (! path->fill_is_rectilinear)
	return FALSE;
    if (! _path_is_quad (path))
	return FALSE;
    buf = cairo_path_head (path);
    if (_points_form_rect (buf->points)) {
	_canonical_box (box, &buf->points[0], &buf->points[2]);
	return TRUE;
    }
    return FALSE;
}