1 /* cairo - a vector graphics library with display and print output
3 * Copyright © 2009 Intel Corporation
5 * This library is free software; you can redistribute it and/or
6 * modify it either under the terms of the GNU Lesser General Public
7 * License version 2.1 as published by the Free Software Foundation
8 * (the "LGPL") or, at your option, under the terms of the Mozilla
9 * Public License Version 1.1 (the "MPL"). If you do not alter this
10 * notice, a recipient may use your version of this file under either
11 * the MPL or the LGPL.
13 * You should have received a copy of the LGPL along with this library
14 * in the file COPYING-LGPL-2.1; if not, write to the Free Software
15 * Foundation, Inc., 51 Franklin Street, Suite 500, Boston, MA 02110-1335, USA
16 * You should have received a copy of the MPL along with this library
17 * in the file COPYING-MPL-1.1
19 * The contents of this file are subject to the Mozilla Public License
20 * Version 1.1 (the "License"); you may not use this file except in
21 * compliance with the License. You may obtain a copy of the License at
22 * http://www.mozilla.org/MPL/
24 * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY
25 * OF ANY KIND, either express or implied. See the LGPL or the MPL for
26 * the specific language governing rights and limitations.
28 * The Original Code is the cairo graphics library.
31 * Chris Wilson <chris@chris-wilson.co.uk>
37 #include "cairo-types-private.h"
38 #include "cairo-compiler-private.h"
43 struct _cairo_boxes_t {
44 cairo_status_t status;
47 const cairo_box_t *limits;
52 unsigned int is_pixel_aligned;
54 struct _cairo_boxes_chunk {
55 struct _cairo_boxes_chunk *next;
60 cairo_box_t boxes_embedded[32];
64 _cairo_boxes_init (cairo_boxes_t *boxes);
67 _cairo_boxes_init_with_clip (cairo_boxes_t *boxes,
71 _cairo_boxes_init_for_array (cairo_boxes_t *boxes,
76 _cairo_boxes_init_from_rectangle (cairo_boxes_t *boxes,
77 int x, int y, int w, int h);
80 _cairo_boxes_limit (cairo_boxes_t *boxes,
81 const cairo_box_t *limits,
84 cairo_private cairo_status_t
85 _cairo_boxes_add (cairo_boxes_t *boxes,
86 cairo_antialias_t antialias,
87 const cairo_box_t *box);
90 _cairo_boxes_extents (const cairo_boxes_t *boxes,
93 cairo_private cairo_box_t *
94 _cairo_boxes_to_array (const cairo_boxes_t *boxes,
96 cairo_bool_t force_allocation);
98 cairo_private cairo_status_t
99 _cairo_boxes_intersect (const cairo_boxes_t *a,
100 const cairo_boxes_t *b,
104 _cairo_boxes_clear (cairo_boxes_t *boxes);
106 cairo_private_no_warn cairo_bool_t
107 _cairo_boxes_for_each_box (cairo_boxes_t *boxes,
108 cairo_bool_t (*func) (cairo_box_t *box, void *data),
111 cairo_private cairo_status_t
112 _cairo_rasterise_polygon_to_boxes (cairo_polygon_t *polygon,
113 cairo_fill_rule_t fill_rule,
114 cairo_boxes_t *boxes);
117 _cairo_boxes_fini (cairo_boxes_t *boxes);
120 _cairo_debug_print_boxes (FILE *stream,
121 const cairo_boxes_t *boxes);
123 #endif /* CAIRO_BOXES_H */