Subversion Repositories Kolibri OS

Rev

Rev 1892 | Go to most recent revision | Details | Compare with Previous | Last modification | View Log | RSS feed

Rev Author Line No. Line
1892 serge 1
/* cairo - a vector graphics library with display and print output
2
 *
3
 * Copyright © 2009 Intel Corporation
4
 *
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.
12
 *
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
18
 *
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/
23
 *
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.
27
 *
28
 * The Original Code is the cairo graphics library.
29
 *
30
 * Contributor(s):
31
 *	Chris Wilson 
32
 */
33
 
34
#ifndef CAIRO_BOXES_H
35
#define CAIRO_BOXES_H
36
 
37
#include "cairo-types-private.h"
38
#include "cairo-compiler-private.h"
39
 
3959 Serge 40
#include 
41
#include 
42
 
1892 serge 43
struct _cairo_boxes_t {
44
    cairo_status_t status;
3959 Serge 45
 
1892 serge 46
    cairo_box_t limit;
47
    const cairo_box_t *limits;
48
    int num_limits;
3959 Serge 49
 
1892 serge 50
    int num_boxes;
51
 
3959 Serge 52
    unsigned int is_pixel_aligned;
53
 
1892 serge 54
    struct _cairo_boxes_chunk {
55
	struct _cairo_boxes_chunk *next;
56
	cairo_box_t *base;
57
	int count;
58
	int size;
59
    } chunks, *tail;
60
    cairo_box_t boxes_embedded[32];
61
};
62
 
63
cairo_private void
64
_cairo_boxes_init (cairo_boxes_t *boxes);
65
 
66
cairo_private void
3959 Serge 67
_cairo_boxes_init_with_clip (cairo_boxes_t *boxes,
68
			     cairo_clip_t *clip);
69
 
70
cairo_private void
1892 serge 71
_cairo_boxes_init_for_array (cairo_boxes_t *boxes,
72
			     cairo_box_t *array,
73
			     int num_boxes);
74
 
75
cairo_private void
3959 Serge 76
_cairo_boxes_init_from_rectangle (cairo_boxes_t *boxes,
77
				  int x, int y, int w, int h);
78
 
79
cairo_private void
1892 serge 80
_cairo_boxes_limit (cairo_boxes_t	*boxes,
81
		    const cairo_box_t	*limits,
82
		    int			 num_limits);
83
 
84
cairo_private cairo_status_t
85
_cairo_boxes_add (cairo_boxes_t *boxes,
3959 Serge 86
		  cairo_antialias_t antialias,
1892 serge 87
		  const cairo_box_t *box);
88
 
89
cairo_private void
90
_cairo_boxes_extents (const cairo_boxes_t *boxes,
3959 Serge 91
		      cairo_box_t *box);
1892 serge 92
 
3959 Serge 93
cairo_private cairo_box_t *
94
_cairo_boxes_to_array (const cairo_boxes_t *boxes,
95
		       int *num_boxes,
96
		       cairo_bool_t force_allocation);
97
 
98
cairo_private cairo_status_t
99
_cairo_boxes_intersect (const cairo_boxes_t *a,
100
			const cairo_boxes_t *b,
101
			cairo_boxes_t *out);
102
 
1892 serge 103
cairo_private void
104
_cairo_boxes_clear (cairo_boxes_t *boxes);
105
 
3959 Serge 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),
109
			   void *data);
110
 
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);
115
 
1892 serge 116
cairo_private void
117
_cairo_boxes_fini (cairo_boxes_t *boxes);
118
 
3959 Serge 119
cairo_private void
120
_cairo_debug_print_boxes (FILE *stream,
121
			  const cairo_boxes_t *boxes);
122
 
1892 serge 123
#endif /* CAIRO_BOXES_H */