[cairo] [PATCH 08/51] core: some in-code documentation

Bryce Harrington bryce at osg.samsung.com
Tue Dec 22 14:29:15 PST 2015


On Fri, Dec 18, 2015 at 02:28:47PM +0100, Enrico Weigelt, metux IT consult wrote:
> Signed-off-by: Enrico Weigelt, metux IT consult <enrico.weigelt at gr13.net>
> ---
>  src/cairo-boxes.c | 26 ++++++++++++++++++++++++++
>  1 file changed, 26 insertions(+)
> 
> diff --git a/src/cairo-boxes.c b/src/cairo-boxes.c
> index 63b68dd..1f1d130 100644
> --- a/src/cairo-boxes.c
> +++ b/src/cairo-boxes.c
> @@ -102,6 +102,16 @@ _cairo_boxes_init_for_array (cairo_boxes_t *boxes,
>      boxes->is_pixel_aligned = n == num_boxes;
>  }
>  
> +/**
> + * Computes the minimum bounding box of the given list of boxes and assign
> + * it to the given boxes set. It also assigns that list as the list of
> + * limiting boxes in the box set.
> + *
> + * @param boxes      the box set to be filled (return buffer)
> + * @param limits     array of the limiting boxes to compute the bounding
> + *                   box from
> + * @param num_limits length of the array pointer to by limits

s/pointer/pointed.

but you could just say "Length of the limits array".

> + */
>  void
>  _cairo_boxes_limit (cairo_boxes_t	*boxes,
>  		    const cairo_box_t	*limits,
> @@ -265,6 +275,13 @@ _cairo_boxes_add (cairo_boxes_t *boxes,
>      return boxes->status;
>  }
>  
> +/**
> + * Computes the minimum bounding box of the given box set and stores
> + * it in the given box.
> + *
> + * @param boxes      the box set whose minimum bounding is computed
> + * @param ox         return buffer for the computed result

s/ox/box/

> + */
>  void
>  _cairo_boxes_extents (const cairo_boxes_t *boxes,
>  		      cairo_box_t *box)
> @@ -317,6 +334,15 @@ _cairo_boxes_clear (cairo_boxes_t *boxes)
>      boxes->is_pixel_aligned = TRUE;
>  }
>  
> +/**
> + * Linearize a box set of possibly multiple chunks into one big chunk
> + * and returns an array of boxes
> + *
> + * @param boxes      the box set to be converted
> + * @param num_boxes  return buffer for the unmber of boxes (array count)
> + * @return           pointer to the newly allocated array of boxes
> + *                   (the number o elements is given in num_boxes)
> + * */

s/unmber/number/, s/o/of/, and there's an extra asterisk on the last line.

Apart from the minor typos the docs themselves look landable, thanks for
giving attention to them!

Bryce

>  cairo_box_t *
>  _cairo_boxes_to_array (const cairo_boxes_t *boxes,
>  		       int *num_boxes,
> -- 
> 2.6.4.442.g545299f
> 
> -- 
> cairo mailing list
> cairo at cairographics.org
> http://lists.cairographics.org/mailman/listinfo/cairo


More information about the cairo mailing list