23.5 Bounding

Sometimes it can be desirable to know the area covered by a path. The fz_bound_path function enables exactly this, both for filled and stroked path. For details of the fz_stroke_state structure, see section 23.6 Stroking.

/* 
   fz_bound_path: Return a bounding rectangle for a path. 
 
   path: The path to bound. 
 
   stroke: If NULL, the bounding rectangle given is for 
   the filled path. If non-NULL the bounding rectangle 
   given is for the path stroked with the given attributes. 
 
   ctm: The matrix to apply to the path during stroking. 
 
   r: Pointer to a fz_rect which will be used to hold 
   the result. 
*/ 
fz_rect *fz_bound_path(fz_context *ctx, const fz_path *path, const fz_stroke_state *stroke, const fz_matrix *ctm, fz_rect *r);