| 1 |
|
| 2 |
@c %start of fragment |
| 3 |
|
| 4 |
@deffn Function cairo-region-create @result{}@tie{} (@var{ret}@tie{}@code{<cairo-region-t >}) |
| 5 |
Allocates a new empty region object. |
| 6 |
|
| 7 |
@table @var |
| 8 |
@item ret |
| 9 |
A newly allocated @code{<cairo-region-t>}. Free with |
| 10 |
@code{cairo-region-destroy}. This function always returns a valid |
| 11 |
pointer; if memory cannot be allocated, then a special error object is |
| 12 |
returned where all operations on the object do nothing. You can check |
| 13 |
for this with @code{cairo-region-status}. |
| 14 |
|
| 15 |
@end table |
| 16 |
|
| 17 |
Since 1.10 |
| 18 |
|
| 19 |
@end deffn |
| 20 |
|
| 21 |
@deffn Function cairo-region-copy (@var{original}@tie{}@code{<cairo-region-t>}) @result{}@tie{} (@var{ret}@tie{}@code{<cairo-region-t >}) |
| 22 |
Allocates a new region object copying the area from @var{original}. |
| 23 |
|
| 24 |
@table @var |
| 25 |
@item original |
| 26 |
a @code{<cairo-region-t>} |
| 27 |
|
| 28 |
@item ret |
| 29 |
A newly allocated @code{<cairo-region-t>}. Free with |
| 30 |
@code{cairo-region-destroy}. This function always returns a valid |
| 31 |
pointer; if memory cannot be allocated, then a special error object is |
| 32 |
returned where all operations on the object do nothing. You can check |
| 33 |
for this with @code{cairo-region-status}. |
| 34 |
|
| 35 |
@end table |
| 36 |
|
| 37 |
Since 1.10 |
| 38 |
|
| 39 |
@end deffn |
| 40 |
|
| 41 |
@deffn Function cairo-region-get-extents (@var{region}@tie{}@code{<cairo-region-t>}) (@var{extents}@tie{}@code{<cairo-rectangle-int-t>}) |
| 42 |
Gets the bounding rectangle of @var{region} as a |
| 43 |
@code{<cairo-rectangle-int-t>} |
| 44 |
|
| 45 |
@table @var |
| 46 |
@item region |
| 47 |
a @code{<cairo-region-t>} |
| 48 |
|
| 49 |
@item extents |
| 50 |
rectangle into which to store the extents |
| 51 |
|
| 52 |
@end table |
| 53 |
|
| 54 |
Since 1.10 |
| 55 |
|
| 56 |
@end deffn |
| 57 |
|
| 58 |
@deffn Function cairo-region-is-empty (@var{region}@tie{}@code{<cairo-region-t>}) @result{}@tie{} (@var{ret}@tie{}@code{<cairo-bool-t>}) |
| 59 |
Checks whether @var{region} is empty. |
| 60 |
|
| 61 |
@table @var |
| 62 |
@item region |
| 63 |
a @code{<cairo-region-t>} |
| 64 |
|
| 65 |
@item ret |
| 66 |
@samp{@code{#t}} if @var{region} is empty, @samp{@code{#f}} if it isn't. |
| 67 |
|
| 68 |
@end table |
| 69 |
|
| 70 |
Since 1.10 |
| 71 |
|
| 72 |
@end deffn |
| 73 |
|
| 74 |
@deffn Function cairo-region-contains-point (@var{region}@tie{}@code{<cairo-region-t>}) (@var{x}@tie{}@code{<int>}) (@var{y}@tie{}@code{<int>}) @result{}@tie{} (@var{ret}@tie{}@code{<cairo-bool-t>}) |
| 75 |
Checks whether (@var{x}, @var{y}) is contained in @var{region}. |
| 76 |
|
| 77 |
@table @var |
| 78 |
@item region |
| 79 |
a @code{<cairo-region-t>} |
| 80 |
|
| 81 |
@item x |
| 82 |
the x coordinate of a point |
| 83 |
|
| 84 |
@item y |
| 85 |
the y coordinate of a point |
| 86 |
|
| 87 |
@item ret |
| 88 |
@samp{@code{#t}} if (@var{x}, @var{y}) is contained in @var{region}, |
| 89 |
@samp{@code{#f}} if it is not. |
| 90 |
|
| 91 |
@end table |
| 92 |
|
| 93 |
Since 1.10 |
| 94 |
|
| 95 |
@end deffn |
| 96 |
|
| 97 |
@deffn Function cairo-region-contains-rectangle (@var{region}@tie{}@code{<cairo-region-t>}) (@var{rectangle}@tie{}@code{<cairo-rectangle-int-t>}) @result{}@tie{} (@var{ret}@tie{}@code{<cairo-region-overlap-t>}) |
| 98 |
Checks whether @var{rectangle} is inside, outside or partially contained |
| 99 |
in @var{region} |
| 100 |
|
| 101 |
@table @var |
| 102 |
@item region |
| 103 |
a @code{<cairo-region-t>} |
| 104 |
|
| 105 |
@item rectangle |
| 106 |
a @code{<cairo-rectangle-int-t>} |
| 107 |
|
| 108 |
@item ret |
| 109 |
@samp{CAIRO_REGION_OVERLAP_IN} if @var{rectangle} is entirely inside |
| 110 |
@var{region}, @samp{CAIRO_REGION_OVERLAP_OUT} if @var{rectangle} is |
| 111 |
entirely outside @var{region}, or @samp{CAIRO_REGION_OVERLAP_PART} if |
| 112 |
@var{rectangle} is partially inside and partially outside @var{region}. |
| 113 |
|
| 114 |
@end table |
| 115 |
|
| 116 |
Since 1.10 |
| 117 |
|
| 118 |
@end deffn |
| 119 |
|
| 120 |
@deffn Function cairo-region-translate (@var{region}@tie{}@code{<cairo-region-t>}) (@var{dx}@tie{}@code{<int>}) (@var{dy}@tie{}@code{<int>}) |
| 121 |
Translates @var{region} by (@var{dx}, @var{dy}). |
| 122 |
|
| 123 |
@table @var |
| 124 |
@item region |
| 125 |
a @code{<cairo-region-t>} |
| 126 |
|
| 127 |
@item dx |
| 128 |
Amount to translate in the x direction |
| 129 |
|
| 130 |
@item dy |
| 131 |
Amount to translate in the y direction |
| 132 |
|
| 133 |
@end table |
| 134 |
|
| 135 |
Since 1.10 |
| 136 |
|
| 137 |
@end deffn |
| 138 |
|
| 139 |
@deffn Function cairo-region-intersect (@var{dst}@tie{}@code{<cairo-region-t>}) (@var{other}@tie{}@code{<cairo-region-t>}) @result{}@tie{} (@var{ret}@tie{}@code{<cairo-status-t>}) |
| 140 |
Computes the intersection of @var{dst} with @var{other} and places the |
| 141 |
result in @var{dst} |
| 142 |
|
| 143 |
@table @var |
| 144 |
@item dst |
| 145 |
a @code{<cairo-region-t>} |
| 146 |
|
| 147 |
@item other |
| 148 |
another @code{<cairo-region-t>} |
| 149 |
|
| 150 |
@item ret |
| 151 |
@samp{CAIRO_STATUS_SUCCESS} or @samp{CAIRO_STATUS_NO_MEMORY} |
| 152 |
|
| 153 |
@end table |
| 154 |
|
| 155 |
Since 1.10 |
| 156 |
|
| 157 |
@end deffn |
| 158 |
|
| 159 |
@deffn Function cairo-region-subtract (@var{dst}@tie{}@code{<cairo-region-t>}) (@var{other}@tie{}@code{<cairo-region-t>}) @result{}@tie{} (@var{ret}@tie{}@code{<cairo-status-t>}) |
| 160 |
Subtracts @var{other} from @var{dst} and places the result in @var{dst} |
| 161 |
|
| 162 |
@table @var |
| 163 |
@item dst |
| 164 |
a @code{<cairo-region-t>} |
| 165 |
|
| 166 |
@item other |
| 167 |
another @code{<cairo-region-t>} |
| 168 |
|
| 169 |
@item ret |
| 170 |
@samp{CAIRO_STATUS_SUCCESS} or @samp{CAIRO_STATUS_NO_MEMORY} |
| 171 |
|
| 172 |
@end table |
| 173 |
|
| 174 |
Since 1.10 |
| 175 |
|
| 176 |
@end deffn |
| 177 |
|
| 178 |
@deffn Function cairo-region-union (@var{dst}@tie{}@code{<cairo-region-t>}) (@var{other}@tie{}@code{<cairo-region-t>}) @result{}@tie{} (@var{ret}@tie{}@code{<cairo-status-t>}) |
| 179 |
Computes the union of @var{dst} with @var{other} and places the result |
| 180 |
in @var{dst} |
| 181 |
|
| 182 |
@table @var |
| 183 |
@item dst |
| 184 |
a @code{<cairo-region-t>} |
| 185 |
|
| 186 |
@item other |
| 187 |
another @code{<cairo-region-t>} |
| 188 |
|
| 189 |
@item ret |
| 190 |
@samp{CAIRO_STATUS_SUCCESS} or @samp{CAIRO_STATUS_NO_MEMORY} |
| 191 |
|
| 192 |
@end table |
| 193 |
|
| 194 |
Since 1.10 |
| 195 |
|
| 196 |
@end deffn |
| 197 |
|
| 198 |
@deffn Function cairo-region-xor (@var{dst}@tie{}@code{<cairo-region-t>}) (@var{other}@tie{}@code{<cairo-region-t>}) @result{}@tie{} (@var{ret}@tie{}@code{<cairo-status-t>}) |
| 199 |
Computes the exclusive difference of @var{dst} with @var{other} and |
| 200 |
places the result in @var{dst}. That is, @var{dst} will be set to |
| 201 |
contain all areas that are either in @var{dst} or in @var{other}, but |
| 202 |
not in both. |
| 203 |
|
| 204 |
@table @var |
| 205 |
@item dst |
| 206 |
a @code{<cairo-region-t>} |
| 207 |
|
| 208 |
@item other |
| 209 |
another @code{<cairo-region-t>} |
| 210 |
|
| 211 |
@item ret |
| 212 |
@samp{CAIRO_STATUS_SUCCESS} or @samp{CAIRO_STATUS_NO_MEMORY} |
| 213 |
|
| 214 |
@end table |
| 215 |
|
| 216 |
Since 1.10 |
| 217 |
|
| 218 |
@end deffn |
| 219 |
|
| 220 |
|
| 221 |
@c %end of fragment |