1b4b94579Smrg/*********************************************************** 2b4b94579Smrg 3b4b94579SmrgCopyright 1987, 1998 The Open Group 4b4b94579Smrg 5b4b94579SmrgPermission to use, copy, modify, distribute, and sell this software and its 6b4b94579Smrgdocumentation for any purpose is hereby granted without fee, provided that 7b4b94579Smrgthe above copyright notice appear in all copies and that both that 8b4b94579Smrgcopyright notice and this permission notice appear in supporting 9b4b94579Smrgdocumentation. 10b4b94579Smrg 11b4b94579SmrgThe above copyright notice and this permission notice shall be included in 12b4b94579Smrgall copies or substantial portions of the Software. 13b4b94579Smrg 14b4b94579SmrgTHE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 15b4b94579SmrgIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 16b4b94579SmrgFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 17b4b94579SmrgOPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN 18b4b94579SmrgAN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN 19b4b94579SmrgCONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 20b4b94579Smrg 21b4b94579SmrgExcept as contained in this notice, the name of The Open Group shall not be 22b4b94579Smrgused in advertising or otherwise to promote the sale, use or other dealings 23b4b94579Smrgin this Software without prior written authorization from The Open Group. 24b4b94579Smrg 25b4b94579SmrgCopyright 1987 by Digital Equipment Corporation, Maynard, Massachusetts. 26b4b94579Smrg 27b4b94579Smrg All Rights Reserved 28b4b94579Smrg 29b4b94579SmrgPermission to use, copy, modify, and distribute this software and its 30b4b94579Smrgdocumentation for any purpose and without fee is hereby granted, 31b4b94579Smrgprovided that the above copyright notice appear in all copies and that 32b4b94579Smrgboth that copyright notice and this permission notice appear in 33b4b94579Smrgsupporting documentation, and that the name of Digital not be 34b4b94579Smrgused in advertising or publicity pertaining to distribution of the 35b4b94579Smrgsoftware without specific, written prior permission. 36b4b94579Smrg 37b4b94579SmrgDIGITAL DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING 38b4b94579SmrgALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL 39b4b94579SmrgDIGITAL BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR 40b4b94579SmrgANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, 41b4b94579SmrgWHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, 42b4b94579SmrgARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS 43b4b94579SmrgSOFTWARE. 44b4b94579Smrg 45b4b94579Smrg******************************************************************/ 46b4b94579Smrg/* 47b4b94579Smrg * Copyright © 1998, 2004 Keith Packard 48b4b94579Smrg * Copyright 2007 Red Hat, Inc. 49b4b94579Smrg * 50b4b94579Smrg * Permission to use, copy, modify, distribute, and sell this software and its 51b4b94579Smrg * documentation for any purpose is hereby granted without fee, provided that 52b4b94579Smrg * the above copyright notice appear in all copies and that both that 53b4b94579Smrg * copyright notice and this permission notice appear in supporting 54b4b94579Smrg * documentation, and that the name of Keith Packard not be used in 55b4b94579Smrg * advertising or publicity pertaining to distribution of the software without 56b4b94579Smrg * specific, written prior permission. Keith Packard makes no 57b4b94579Smrg * representations about the suitability of this software for any purpose. It 58b4b94579Smrg * is provided "as is" without express or implied warranty. 59b4b94579Smrg * 60b4b94579Smrg * KEITH PACKARD DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, 61b4b94579Smrg * INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO 62b4b94579Smrg * EVENT SHALL KEITH PACKARD BE LIABLE FOR ANY SPECIAL, INDIRECT OR 63b4b94579Smrg * CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, 64b4b94579Smrg * DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER 65b4b94579Smrg * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR 66b4b94579Smrg * PERFORMANCE OF THIS SOFTWARE. 67b4b94579Smrg */ 68b4b94579Smrg 69b4b94579Smrg#ifndef PIXMAN_H__ 70b4b94579Smrg#define PIXMAN_H__ 71b4b94579Smrg 72b4b94579Smrg#include <pixman-version.h> 73b4b94579Smrg 74952204abSmrg#ifdef __cplusplus 75952204abSmrg#define PIXMAN_BEGIN_DECLS extern "C" { 76952204abSmrg#define PIXMAN_END_DECLS } 77952204abSmrg#else 78952204abSmrg#define PIXMAN_BEGIN_DECLS 79952204abSmrg#define PIXMAN_END_DECLS 80952204abSmrg#endif 81952204abSmrg 82952204abSmrgPIXMAN_BEGIN_DECLS 83952204abSmrg 84b4b94579Smrg/* 85b4b94579Smrg * Standard integers 86b4b94579Smrg */ 87952204abSmrg 88952204abSmrg#if !defined (PIXMAN_DONT_DEFINE_STDINT) 89952204abSmrg 90952204abSmrg#if defined (_SVR4) || defined (SVR4) || defined (__OpenBSD__) || defined (_sgi) || defined (__sun) || defined (sun) || defined (__digital__) || defined (__HP_cc) 91b4b94579Smrg# include <inttypes.h> 92952204abSmrg/* VS 2010 (_MSC_VER 1600) has stdint.h */ 93952204abSmrg#elif defined (_MSC_VER) && _MSC_VER < 1600 94b4b94579Smrgtypedef __int8 int8_t; 95b4b94579Smrgtypedef unsigned __int8 uint8_t; 96b4b94579Smrgtypedef __int16 int16_t; 97b4b94579Smrgtypedef unsigned __int16 uint16_t; 98b4b94579Smrgtypedef __int32 int32_t; 99b4b94579Smrgtypedef unsigned __int32 uint32_t; 100b4b94579Smrgtypedef __int64 int64_t; 101b4b94579Smrgtypedef unsigned __int64 uint64_t; 10227693ee9Sveego#elif defined (_AIX) 10327693ee9Sveego# include <sys/inttypes.h> 104b4b94579Smrg#else 105b4b94579Smrg# include <stdint.h> 106b4b94579Smrg#endif 107b4b94579Smrg 108952204abSmrg#endif 109952204abSmrg 110b4b94579Smrg/* 111b4b94579Smrg * Boolean 112b4b94579Smrg */ 113b4b94579Smrgtypedef int pixman_bool_t; 114b4b94579Smrg 115b4b94579Smrg/* 116b4b94579Smrg * Fixpoint numbers 117b4b94579Smrg */ 118b4b94579Smrgtypedef int64_t pixman_fixed_32_32_t; 119b4b94579Smrgtypedef pixman_fixed_32_32_t pixman_fixed_48_16_t; 120b4b94579Smrgtypedef uint32_t pixman_fixed_1_31_t; 121b4b94579Smrgtypedef uint32_t pixman_fixed_1_16_t; 122b4b94579Smrgtypedef int32_t pixman_fixed_16_16_t; 123b4b94579Smrgtypedef pixman_fixed_16_16_t pixman_fixed_t; 124b4b94579Smrg 125b4b94579Smrg#define pixman_fixed_e ((pixman_fixed_t) 1) 126b4b94579Smrg#define pixman_fixed_1 (pixman_int_to_fixed(1)) 127b4b94579Smrg#define pixman_fixed_1_minus_e (pixman_fixed_1 - pixman_fixed_e) 128952204abSmrg#define pixman_fixed_minus_1 (pixman_int_to_fixed(-1)) 129b4b94579Smrg#define pixman_fixed_to_int(f) ((int) ((f) >> 16)) 1307e806d9dSmrg#define pixman_int_to_fixed(i) ((pixman_fixed_t) ((uint32_t) (i) << 16)) 131b4b94579Smrg#define pixman_fixed_to_double(f) (double) ((f) / (double) pixman_fixed_1) 132b4b94579Smrg#define pixman_double_to_fixed(d) ((pixman_fixed_t) ((d) * 65536.0)) 133b4b94579Smrg#define pixman_fixed_frac(f) ((f) & pixman_fixed_1_minus_e) 134b4b94579Smrg#define pixman_fixed_floor(f) ((f) & ~pixman_fixed_1_minus_e) 135b4b94579Smrg#define pixman_fixed_ceil(f) pixman_fixed_floor ((f) + pixman_fixed_1_minus_e) 136b4b94579Smrg#define pixman_fixed_fraction(f) ((f) & pixman_fixed_1_minus_e) 137b4b94579Smrg#define pixman_fixed_mod_2(f) ((f) & (pixman_fixed1 | pixman_fixed_1_minus_e)) 138b4b94579Smrg#define pixman_max_fixed_48_16 ((pixman_fixed_48_16_t) 0x7fffffff) 139b4b94579Smrg#define pixman_min_fixed_48_16 (-((pixman_fixed_48_16_t) 1 << 31)) 140b4b94579Smrg 141b4b94579Smrg/* 142b4b94579Smrg * Misc structs 143b4b94579Smrg */ 144b4b94579Smrgtypedef struct pixman_color pixman_color_t; 145b4b94579Smrgtypedef struct pixman_point_fixed pixman_point_fixed_t; 146b4b94579Smrgtypedef struct pixman_line_fixed pixman_line_fixed_t; 147b4b94579Smrgtypedef struct pixman_vector pixman_vector_t; 148b4b94579Smrgtypedef struct pixman_transform pixman_transform_t; 149b4b94579Smrg 150b4b94579Smrgstruct pixman_color 151b4b94579Smrg{ 152b4b94579Smrg uint16_t red; 153b4b94579Smrg uint16_t green; 154b4b94579Smrg uint16_t blue; 155b4b94579Smrg uint16_t alpha; 156b4b94579Smrg}; 157b4b94579Smrg 158b4b94579Smrgstruct pixman_point_fixed 159b4b94579Smrg{ 160b4b94579Smrg pixman_fixed_t x; 161b4b94579Smrg pixman_fixed_t y; 162b4b94579Smrg}; 163b4b94579Smrg 164b4b94579Smrgstruct pixman_line_fixed 165b4b94579Smrg{ 166b4b94579Smrg pixman_point_fixed_t p1, p2; 167b4b94579Smrg}; 168b4b94579Smrg 169317c648bSmrg/* 170317c648bSmrg * Fixed point matrices 171317c648bSmrg */ 172317c648bSmrg 173b4b94579Smrgstruct pixman_vector 174b4b94579Smrg{ 175b4b94579Smrg pixman_fixed_t vector[3]; 176b4b94579Smrg}; 177b4b94579Smrg 178b4b94579Smrgstruct pixman_transform 179b4b94579Smrg{ 180b4b94579Smrg pixman_fixed_t matrix[3][3]; 181b4b94579Smrg}; 182b4b94579Smrg 183317c648bSmrg/* forward declaration (sorry) */ 184317c648bSmrgstruct pixman_box16; 185952204abSmrgtypedef union pixman_image pixman_image_t; 186317c648bSmrg 187f766d2f6SmrgPIXMAN_API 188d0321353Smrgvoid pixman_transform_init_identity (struct pixman_transform *matrix); 189f766d2f6Smrg 190f766d2f6SmrgPIXMAN_API 191d0321353Smrgpixman_bool_t pixman_transform_point_3d (const struct pixman_transform *transform, 192d0321353Smrg struct pixman_vector *vector); 193f766d2f6Smrg 194f766d2f6SmrgPIXMAN_API 195d0321353Smrgpixman_bool_t pixman_transform_point (const struct pixman_transform *transform, 196d0321353Smrg struct pixman_vector *vector); 197f766d2f6Smrg 198f766d2f6SmrgPIXMAN_API 199d0321353Smrgpixman_bool_t pixman_transform_multiply (struct pixman_transform *dst, 200d0321353Smrg const struct pixman_transform *l, 201d0321353Smrg const struct pixman_transform *r); 202f766d2f6Smrg 203f766d2f6SmrgPIXMAN_API 204d0321353Smrgvoid pixman_transform_init_scale (struct pixman_transform *t, 205d0321353Smrg pixman_fixed_t sx, 206d0321353Smrg pixman_fixed_t sy); 207f766d2f6Smrg 208f766d2f6SmrgPIXMAN_API 209d0321353Smrgpixman_bool_t pixman_transform_scale (struct pixman_transform *forward, 210d0321353Smrg struct pixman_transform *reverse, 211d0321353Smrg pixman_fixed_t sx, 212d0321353Smrg pixman_fixed_t sy); 213f766d2f6Smrg 214f766d2f6SmrgPIXMAN_API 215d0321353Smrgvoid pixman_transform_init_rotate (struct pixman_transform *t, 216d0321353Smrg pixman_fixed_t cos, 217d0321353Smrg pixman_fixed_t sin); 218f766d2f6Smrg 219f766d2f6SmrgPIXMAN_API 220d0321353Smrgpixman_bool_t pixman_transform_rotate (struct pixman_transform *forward, 221d0321353Smrg struct pixman_transform *reverse, 222d0321353Smrg pixman_fixed_t c, 223d0321353Smrg pixman_fixed_t s); 224f766d2f6Smrg 225f766d2f6SmrgPIXMAN_API 226d0321353Smrgvoid pixman_transform_init_translate (struct pixman_transform *t, 227d0321353Smrg pixman_fixed_t tx, 228d0321353Smrg pixman_fixed_t ty); 229f766d2f6Smrg 230f766d2f6SmrgPIXMAN_API 231d0321353Smrgpixman_bool_t pixman_transform_translate (struct pixman_transform *forward, 232d0321353Smrg struct pixman_transform *reverse, 233d0321353Smrg pixman_fixed_t tx, 234d0321353Smrg pixman_fixed_t ty); 235f766d2f6Smrg 236f766d2f6SmrgPIXMAN_API 237d0321353Smrgpixman_bool_t pixman_transform_bounds (const struct pixman_transform *matrix, 238d0321353Smrg struct pixman_box16 *b); 239f766d2f6Smrg 240f766d2f6SmrgPIXMAN_API 241d0321353Smrgpixman_bool_t pixman_transform_invert (struct pixman_transform *dst, 242d0321353Smrg const struct pixman_transform *src); 243f766d2f6Smrg 244f766d2f6SmrgPIXMAN_API 245d0321353Smrgpixman_bool_t pixman_transform_is_identity (const struct pixman_transform *t); 246f766d2f6Smrg 247f766d2f6SmrgPIXMAN_API 248d0321353Smrgpixman_bool_t pixman_transform_is_scale (const struct pixman_transform *t); 249f766d2f6Smrg 250f766d2f6SmrgPIXMAN_API 251d0321353Smrgpixman_bool_t pixman_transform_is_int_translate (const struct pixman_transform *t); 252f766d2f6Smrg 253f766d2f6SmrgPIXMAN_API 254d0321353Smrgpixman_bool_t pixman_transform_is_inverse (const struct pixman_transform *a, 255d0321353Smrg const struct pixman_transform *b); 256317c648bSmrg 257317c648bSmrg/* 258317c648bSmrg * Floating point matrices 259317c648bSmrg */ 2609a0cb412Smrgtypedef struct pixman_f_transform pixman_f_transform_t; 2619a0cb412Smrgtypedef struct pixman_f_vector pixman_f_vector_t; 2629a0cb412Smrg 263d0321353Smrgstruct pixman_f_vector 264d0321353Smrg{ 265317c648bSmrg double v[3]; 266317c648bSmrg}; 267317c648bSmrg 268d0321353Smrgstruct pixman_f_transform 269d0321353Smrg{ 270317c648bSmrg double m[3][3]; 271317c648bSmrg}; 272317c648bSmrg 273f766d2f6Smrg 274f766d2f6SmrgPIXMAN_API 275d0321353Smrgpixman_bool_t pixman_transform_from_pixman_f_transform (struct pixman_transform *t, 276d0321353Smrg const struct pixman_f_transform *ft); 277f766d2f6Smrg 278f766d2f6SmrgPIXMAN_API 279d0321353Smrgvoid pixman_f_transform_from_pixman_transform (struct pixman_f_transform *ft, 280d0321353Smrg const struct pixman_transform *t); 281f766d2f6Smrg 282f766d2f6SmrgPIXMAN_API 283d0321353Smrgpixman_bool_t pixman_f_transform_invert (struct pixman_f_transform *dst, 284d0321353Smrg const struct pixman_f_transform *src); 285f766d2f6Smrg 286f766d2f6SmrgPIXMAN_API 287d0321353Smrgpixman_bool_t pixman_f_transform_point (const struct pixman_f_transform *t, 288d0321353Smrg struct pixman_f_vector *v); 289f766d2f6Smrg 290f766d2f6SmrgPIXMAN_API 291d0321353Smrgvoid pixman_f_transform_point_3d (const struct pixman_f_transform *t, 292d0321353Smrg struct pixman_f_vector *v); 293f766d2f6Smrg 294f766d2f6SmrgPIXMAN_API 295d0321353Smrgvoid pixman_f_transform_multiply (struct pixman_f_transform *dst, 296d0321353Smrg const struct pixman_f_transform *l, 297d0321353Smrg const struct pixman_f_transform *r); 298f766d2f6Smrg 299f766d2f6SmrgPIXMAN_API 300d0321353Smrgvoid pixman_f_transform_init_scale (struct pixman_f_transform *t, 301d0321353Smrg double sx, 302d0321353Smrg double sy); 303f766d2f6Smrg 304f766d2f6SmrgPIXMAN_API 305d0321353Smrgpixman_bool_t pixman_f_transform_scale (struct pixman_f_transform *forward, 306d0321353Smrg struct pixman_f_transform *reverse, 307d0321353Smrg double sx, 308d0321353Smrg double sy); 309f766d2f6Smrg 310f766d2f6SmrgPIXMAN_API 311d0321353Smrgvoid pixman_f_transform_init_rotate (struct pixman_f_transform *t, 312d0321353Smrg double cos, 313d0321353Smrg double sin); 314f766d2f6Smrg 315f766d2f6SmrgPIXMAN_API 316d0321353Smrgpixman_bool_t pixman_f_transform_rotate (struct pixman_f_transform *forward, 317d0321353Smrg struct pixman_f_transform *reverse, 318d0321353Smrg double c, 319d0321353Smrg double s); 320f766d2f6Smrg 321f766d2f6SmrgPIXMAN_API 322d0321353Smrgvoid pixman_f_transform_init_translate (struct pixman_f_transform *t, 323d0321353Smrg double tx, 324d0321353Smrg double ty); 325f766d2f6Smrg 326f766d2f6SmrgPIXMAN_API 327d0321353Smrgpixman_bool_t pixman_f_transform_translate (struct pixman_f_transform *forward, 328d0321353Smrg struct pixman_f_transform *reverse, 329d0321353Smrg double tx, 330d0321353Smrg double ty); 331f766d2f6Smrg 332f766d2f6SmrgPIXMAN_API 333d0321353Smrgpixman_bool_t pixman_f_transform_bounds (const struct pixman_f_transform *t, 334d0321353Smrg struct pixman_box16 *b); 335f766d2f6Smrg 336f766d2f6SmrgPIXMAN_API 337d0321353Smrgvoid pixman_f_transform_init_identity (struct pixman_f_transform *t); 338317c648bSmrg 339b4b94579Smrgtypedef enum 340b4b94579Smrg{ 341b4b94579Smrg PIXMAN_REPEAT_NONE, 342b4b94579Smrg PIXMAN_REPEAT_NORMAL, 343b4b94579Smrg PIXMAN_REPEAT_PAD, 344b4b94579Smrg PIXMAN_REPEAT_REFLECT 345b4b94579Smrg} pixman_repeat_t; 346b4b94579Smrg 347f766d2f6Smrgtypedef enum 348f766d2f6Smrg{ 349f766d2f6Smrg PIXMAN_DITHER_NONE, 350f766d2f6Smrg PIXMAN_DITHER_FAST, 351f766d2f6Smrg PIXMAN_DITHER_GOOD, 352f766d2f6Smrg PIXMAN_DITHER_BEST, 353f766d2f6Smrg PIXMAN_DITHER_ORDERED_BAYER_8, 354f766d2f6Smrg PIXMAN_DITHER_ORDERED_BLUE_NOISE_64, 355f766d2f6Smrg} pixman_dither_t; 356f766d2f6Smrg 357b4b94579Smrgtypedef enum 358b4b94579Smrg{ 359b4b94579Smrg PIXMAN_FILTER_FAST, 360b4b94579Smrg PIXMAN_FILTER_GOOD, 361b4b94579Smrg PIXMAN_FILTER_BEST, 362b4b94579Smrg PIXMAN_FILTER_NEAREST, 363b4b94579Smrg PIXMAN_FILTER_BILINEAR, 3649a0cb412Smrg PIXMAN_FILTER_CONVOLUTION, 3659a0cb412Smrg 3669a0cb412Smrg /* The SEPARABLE_CONVOLUTION filter takes the following parameters: 3679a0cb412Smrg * 3689a0cb412Smrg * width: integer given as 16.16 fixpoint number 3699a0cb412Smrg * height: integer given as 16.16 fixpoint number 3709a0cb412Smrg * x_phase_bits: integer given as 16.16 fixpoint 3719a0cb412Smrg * y_phase_bits: integer given as 16.16 fixpoint 3729a0cb412Smrg * xtables: (1 << x_phase_bits) tables of size width 3739a0cb412Smrg * ytables: (1 << y_phase_bits) tables of size height 3749a0cb412Smrg * 3759a0cb412Smrg * When sampling at (x, y), the location is first rounded to one of 3769a0cb412Smrg * n_x_phases * n_y_phases subpixel positions. These subpixel positions 3779a0cb412Smrg * determine an xtable and a ytable to use. 3789a0cb412Smrg * 3799a0cb412Smrg * Conceptually a width x height matrix is then formed in which each entry 3809a0cb412Smrg * is the product of the corresponding entries in the x and y tables. 3819a0cb412Smrg * This matrix is then aligned with the image pixels such that its center 3829a0cb412Smrg * is as close as possible to the subpixel location chosen earlier. Then 3839a0cb412Smrg * the image is convolved with the matrix and the resulting pixel returned. 3849a0cb412Smrg */ 3859a0cb412Smrg PIXMAN_FILTER_SEPARABLE_CONVOLUTION 386b4b94579Smrg} pixman_filter_t; 387b4b94579Smrg 388b4b94579Smrgtypedef enum 389b4b94579Smrg{ 390b4b94579Smrg PIXMAN_OP_CLEAR = 0x00, 391b4b94579Smrg PIXMAN_OP_SRC = 0x01, 392b4b94579Smrg PIXMAN_OP_DST = 0x02, 393b4b94579Smrg PIXMAN_OP_OVER = 0x03, 394b4b94579Smrg PIXMAN_OP_OVER_REVERSE = 0x04, 395b4b94579Smrg PIXMAN_OP_IN = 0x05, 396b4b94579Smrg PIXMAN_OP_IN_REVERSE = 0x06, 397b4b94579Smrg PIXMAN_OP_OUT = 0x07, 398b4b94579Smrg PIXMAN_OP_OUT_REVERSE = 0x08, 399b4b94579Smrg PIXMAN_OP_ATOP = 0x09, 400b4b94579Smrg PIXMAN_OP_ATOP_REVERSE = 0x0a, 401b4b94579Smrg PIXMAN_OP_XOR = 0x0b, 402b4b94579Smrg PIXMAN_OP_ADD = 0x0c, 403b4b94579Smrg PIXMAN_OP_SATURATE = 0x0d, 404b4b94579Smrg 405b4b94579Smrg PIXMAN_OP_DISJOINT_CLEAR = 0x10, 406b4b94579Smrg PIXMAN_OP_DISJOINT_SRC = 0x11, 407b4b94579Smrg PIXMAN_OP_DISJOINT_DST = 0x12, 408b4b94579Smrg PIXMAN_OP_DISJOINT_OVER = 0x13, 409b4b94579Smrg PIXMAN_OP_DISJOINT_OVER_REVERSE = 0x14, 410b4b94579Smrg PIXMAN_OP_DISJOINT_IN = 0x15, 411b4b94579Smrg PIXMAN_OP_DISJOINT_IN_REVERSE = 0x16, 412b4b94579Smrg PIXMAN_OP_DISJOINT_OUT = 0x17, 413b4b94579Smrg PIXMAN_OP_DISJOINT_OUT_REVERSE = 0x18, 414b4b94579Smrg PIXMAN_OP_DISJOINT_ATOP = 0x19, 415b4b94579Smrg PIXMAN_OP_DISJOINT_ATOP_REVERSE = 0x1a, 416b4b94579Smrg PIXMAN_OP_DISJOINT_XOR = 0x1b, 417b4b94579Smrg 418b4b94579Smrg PIXMAN_OP_CONJOINT_CLEAR = 0x20, 419b4b94579Smrg PIXMAN_OP_CONJOINT_SRC = 0x21, 420b4b94579Smrg PIXMAN_OP_CONJOINT_DST = 0x22, 421b4b94579Smrg PIXMAN_OP_CONJOINT_OVER = 0x23, 422b4b94579Smrg PIXMAN_OP_CONJOINT_OVER_REVERSE = 0x24, 423b4b94579Smrg PIXMAN_OP_CONJOINT_IN = 0x25, 424b4b94579Smrg PIXMAN_OP_CONJOINT_IN_REVERSE = 0x26, 425b4b94579Smrg PIXMAN_OP_CONJOINT_OUT = 0x27, 426b4b94579Smrg PIXMAN_OP_CONJOINT_OUT_REVERSE = 0x28, 427b4b94579Smrg PIXMAN_OP_CONJOINT_ATOP = 0x29, 428b4b94579Smrg PIXMAN_OP_CONJOINT_ATOP_REVERSE = 0x2a, 429b4b94579Smrg PIXMAN_OP_CONJOINT_XOR = 0x2b, 430b4b94579Smrg 431dc259aabSmrg PIXMAN_OP_MULTIPLY = 0x30, 432dc259aabSmrg PIXMAN_OP_SCREEN = 0x31, 433dc259aabSmrg PIXMAN_OP_OVERLAY = 0x32, 434dc259aabSmrg PIXMAN_OP_DARKEN = 0x33, 435dc259aabSmrg PIXMAN_OP_LIGHTEN = 0x34, 436dc259aabSmrg PIXMAN_OP_COLOR_DODGE = 0x35, 437dc259aabSmrg PIXMAN_OP_COLOR_BURN = 0x36, 438dc259aabSmrg PIXMAN_OP_HARD_LIGHT = 0x37, 439dc259aabSmrg PIXMAN_OP_SOFT_LIGHT = 0x38, 440dc259aabSmrg PIXMAN_OP_DIFFERENCE = 0x39, 441dc259aabSmrg PIXMAN_OP_EXCLUSION = 0x3a, 442dc259aabSmrg PIXMAN_OP_HSL_HUE = 0x3b, 443dc259aabSmrg PIXMAN_OP_HSL_SATURATION = 0x3c, 444dc259aabSmrg PIXMAN_OP_HSL_COLOR = 0x3d, 445952204abSmrg PIXMAN_OP_HSL_LUMINOSITY = 0x3e 446dc259aabSmrg 447952204abSmrg#ifdef PIXMAN_USE_INTERNAL_API 448952204abSmrg , 449952204abSmrg PIXMAN_N_OPERATORS, 450afd9aa65Sapb PIXMAN_OP_NONE = PIXMAN_N_OPERATORS, 451afd9aa65Sapb PIXMAN_OP_any = PIXMAN_N_OPERATORS + 1 452952204abSmrg#endif 453b4b94579Smrg} pixman_op_t; 454b4b94579Smrg 455b4b94579Smrg/* 456b4b94579Smrg * Regions 457b4b94579Smrg */ 458b4b94579Smrgtypedef struct pixman_region16_data pixman_region16_data_t; 459b4b94579Smrgtypedef struct pixman_box16 pixman_box16_t; 460b4b94579Smrgtypedef struct pixman_rectangle16 pixman_rectangle16_t; 461b4b94579Smrgtypedef struct pixman_region16 pixman_region16_t; 462b4b94579Smrg 463b4b94579Smrgstruct pixman_region16_data { 464b4b94579Smrg long size; 465b4b94579Smrg long numRects; 466b4b94579Smrg/* pixman_box16_t rects[size]; in memory but not explicitly declared */ 467b4b94579Smrg}; 468b4b94579Smrg 469b4b94579Smrgstruct pixman_rectangle16 470b4b94579Smrg{ 471d0321353Smrg int16_t x, y; 472d0321353Smrg uint16_t width, height; 473b4b94579Smrg}; 474b4b94579Smrg 475b4b94579Smrgstruct pixman_box16 476b4b94579Smrg{ 477b4b94579Smrg int16_t x1, y1, x2, y2; 478b4b94579Smrg}; 479b4b94579Smrg 480b4b94579Smrgstruct pixman_region16 481b4b94579Smrg{ 482b4b94579Smrg pixman_box16_t extents; 483d0321353Smrg pixman_region16_data_t *data; 484b4b94579Smrg}; 485b4b94579Smrg 486b4b94579Smrgtypedef enum 487b4b94579Smrg{ 488b4b94579Smrg PIXMAN_REGION_OUT, 489b4b94579Smrg PIXMAN_REGION_IN, 490b4b94579Smrg PIXMAN_REGION_PART 491b4b94579Smrg} pixman_region_overlap_t; 492b4b94579Smrg 493d0321353Smrg/* This function exists only to make it possible to preserve 494d0321353Smrg * the X ABI - it should go away at first opportunity. 495b4b94579Smrg */ 496f766d2f6SmrgPIXMAN_API 497d0321353Smrgvoid pixman_region_set_static_pointers (pixman_box16_t *empty_box, 498d0321353Smrg pixman_region16_data_t *empty_data, 499d0321353Smrg pixman_region16_data_t *broken_data); 500b4b94579Smrg 501b4b94579Smrg/* creation/destruction */ 502f766d2f6SmrgPIXMAN_API 503d0321353Smrgvoid pixman_region_init (pixman_region16_t *region); 504f766d2f6Smrg 505f766d2f6SmrgPIXMAN_API 506d0321353Smrgvoid pixman_region_init_rect (pixman_region16_t *region, 507d0321353Smrg int x, 508d0321353Smrg int y, 509d0321353Smrg unsigned int width, 510d0321353Smrg unsigned int height); 511f766d2f6Smrg 512f766d2f6SmrgPIXMAN_API 513d0321353Smrgpixman_bool_t pixman_region_init_rects (pixman_region16_t *region, 514952204abSmrg const pixman_box16_t *boxes, 515d0321353Smrg int count); 516f766d2f6Smrg 517f766d2f6SmrgPIXMAN_API 518f766d2f6Smrgvoid pixman_region_init_with_extents (pixman_region16_t *region, 519f766d2f6Smrg const pixman_box16_t *extents); 520f766d2f6Smrg 521f766d2f6SmrgPIXMAN_API 522952204abSmrgvoid pixman_region_init_from_image (pixman_region16_t *region, 523952204abSmrg pixman_image_t *image); 524f766d2f6Smrg 525f766d2f6SmrgPIXMAN_API 526d0321353Smrgvoid pixman_region_fini (pixman_region16_t *region); 527b4b94579Smrg 528b4b94579Smrg 529d0321353Smrg/* manipulation */ 530f766d2f6SmrgPIXMAN_API 531d0321353Smrgvoid pixman_region_translate (pixman_region16_t *region, 532d0321353Smrg int x, 533d0321353Smrg int y); 534f766d2f6Smrg 535f766d2f6SmrgPIXMAN_API 536f766d2f6Smrgpixman_bool_t pixman_region_copy (pixman_region16_t *dest, 537f766d2f6Smrg const pixman_region16_t *source); 538f766d2f6Smrg 539f766d2f6SmrgPIXMAN_API 540f766d2f6Smrgpixman_bool_t pixman_region_intersect (pixman_region16_t *new_reg, 541f766d2f6Smrg const pixman_region16_t *reg1, 542f766d2f6Smrg const pixman_region16_t *reg2); 543f766d2f6Smrg 544f766d2f6SmrgPIXMAN_API 545f766d2f6Smrgpixman_bool_t pixman_region_union (pixman_region16_t *new_reg, 546f766d2f6Smrg const pixman_region16_t *reg1, 547f766d2f6Smrg const pixman_region16_t *reg2); 548f766d2f6Smrg 549f766d2f6SmrgPIXMAN_API 550f766d2f6Smrgpixman_bool_t pixman_region_union_rect (pixman_region16_t *dest, 551f766d2f6Smrg const pixman_region16_t *source, 552f766d2f6Smrg int x, 553f766d2f6Smrg int y, 554f766d2f6Smrg unsigned int width, 555f766d2f6Smrg unsigned int height); 556f766d2f6Smrg 557f766d2f6SmrgPIXMAN_API 558f766d2f6Smrgpixman_bool_t pixman_region_intersect_rect (pixman_region16_t *dest, 559f766d2f6Smrg const pixman_region16_t *source, 560f766d2f6Smrg int x, 561f766d2f6Smrg int y, 562f766d2f6Smrg unsigned int width, 563f766d2f6Smrg unsigned int height); 564f766d2f6Smrg 565f766d2f6SmrgPIXMAN_API 566f766d2f6Smrgpixman_bool_t pixman_region_subtract (pixman_region16_t *reg_d, 567f766d2f6Smrg const pixman_region16_t *reg_m, 568f766d2f6Smrg const pixman_region16_t *reg_s); 569f766d2f6Smrg 570f766d2f6SmrgPIXMAN_API 571f766d2f6Smrgpixman_bool_t pixman_region_inverse (pixman_region16_t *new_reg, 572f766d2f6Smrg const pixman_region16_t *reg1, 573f766d2f6Smrg const pixman_box16_t *inv_rect); 574f766d2f6Smrg 575f766d2f6SmrgPIXMAN_API 576f766d2f6Smrgpixman_bool_t pixman_region_contains_point (const pixman_region16_t *region, 577f766d2f6Smrg int x, 578f766d2f6Smrg int y, 579f766d2f6Smrg pixman_box16_t *box); 580f766d2f6Smrg 581f766d2f6SmrgPIXMAN_API 582f766d2f6Smrgpixman_region_overlap_t pixman_region_contains_rectangle (const pixman_region16_t *region, 583f766d2f6Smrg const pixman_box16_t *prect); 584f766d2f6Smrg 585f766d2f6SmrgPIXMAN_API 586f766d2f6Smrgpixman_bool_t pixman_region_empty (const pixman_region16_t *region); 587f766d2f6Smrg 588f766d2f6SmrgPIXMAN_API 589f766d2f6Smrgpixman_bool_t pixman_region_not_empty (const pixman_region16_t *region); 590f766d2f6Smrg 591f766d2f6SmrgPIXMAN_API 592f766d2f6Smrgpixman_box16_t * pixman_region_extents (const pixman_region16_t *region); 593f766d2f6Smrg 594f766d2f6SmrgPIXMAN_API 595f766d2f6Smrgint pixman_region_n_rects (const pixman_region16_t *region); 596f766d2f6Smrg 597f766d2f6SmrgPIXMAN_API 598f766d2f6Smrgpixman_box16_t * pixman_region_rectangles (const pixman_region16_t *region, 599f766d2f6Smrg int *n_rects); 600f766d2f6Smrg 601f766d2f6SmrgPIXMAN_API 602f766d2f6Smrgpixman_bool_t pixman_region_equal (const pixman_region16_t *region1, 603f766d2f6Smrg const pixman_region16_t *region2); 604f766d2f6Smrg 605f766d2f6SmrgPIXMAN_API 60600c1132bSwizpixman_bool_t pixman_region_selfcheck (const pixman_region16_t *region); 607f766d2f6Smrg 608f766d2f6SmrgPIXMAN_API 609f766d2f6Smrgvoid pixman_region_reset (pixman_region16_t *region, 610f766d2f6Smrg const pixman_box16_t *box); 611f766d2f6Smrg 612f766d2f6SmrgPIXMAN_API 61381988197Sjmcneillvoid pixman_region_clear (pixman_region16_t *region); 614b4b94579Smrg/* 615b4b94579Smrg * 32 bit regions 616b4b94579Smrg */ 617b4b94579Smrgtypedef struct pixman_region32_data pixman_region32_data_t; 618b4b94579Smrgtypedef struct pixman_box32 pixman_box32_t; 619b4b94579Smrgtypedef struct pixman_rectangle32 pixman_rectangle32_t; 620b4b94579Smrgtypedef struct pixman_region32 pixman_region32_t; 621b4b94579Smrg 622b4b94579Smrgstruct pixman_region32_data { 623b4b94579Smrg long size; 624b4b94579Smrg long numRects; 625b4b94579Smrg/* pixman_box32_t rects[size]; in memory but not explicitly declared */ 626b4b94579Smrg}; 627b4b94579Smrg 628b4b94579Smrgstruct pixman_rectangle32 629b4b94579Smrg{ 630b4b94579Smrg int32_t x, y; 631b4b94579Smrg uint32_t width, height; 632b4b94579Smrg}; 633b4b94579Smrg 634b4b94579Smrgstruct pixman_box32 635b4b94579Smrg{ 636b4b94579Smrg int32_t x1, y1, x2, y2; 637b4b94579Smrg}; 638b4b94579Smrg 639b4b94579Smrgstruct pixman_region32 640b4b94579Smrg{ 641b4b94579Smrg pixman_box32_t extents; 642b4b94579Smrg pixman_region32_data_t *data; 643b4b94579Smrg}; 644b4b94579Smrg 645b4b94579Smrg/* creation/destruction */ 646f766d2f6SmrgPIXMAN_API 647b4b94579Smrgvoid pixman_region32_init (pixman_region32_t *region); 648f766d2f6Smrg 649f766d2f6SmrgPIXMAN_API 650b4b94579Smrgvoid pixman_region32_init_rect (pixman_region32_t *region, 651b4b94579Smrg int x, 652b4b94579Smrg int y, 653b4b94579Smrg unsigned int width, 654b4b94579Smrg unsigned int height); 655f766d2f6Smrg 656f766d2f6SmrgPIXMAN_API 657b4b94579Smrgpixman_bool_t pixman_region32_init_rects (pixman_region32_t *region, 658952204abSmrg const pixman_box32_t *boxes, 659b4b94579Smrg int count); 660f766d2f6Smrg 661f766d2f6SmrgPIXMAN_API 662f766d2f6Smrgvoid pixman_region32_init_with_extents (pixman_region32_t *region, 663f766d2f6Smrg const pixman_box32_t *extents); 664f766d2f6Smrg 665f766d2f6SmrgPIXMAN_API 666952204abSmrgvoid pixman_region32_init_from_image (pixman_region32_t *region, 667952204abSmrg pixman_image_t *image); 668f766d2f6Smrg 669f766d2f6SmrgPIXMAN_API 670b4b94579Smrgvoid pixman_region32_fini (pixman_region32_t *region); 671b4b94579Smrg 672b4b94579Smrg 673b4b94579Smrg/* manipulation */ 674f766d2f6SmrgPIXMAN_API 675b4b94579Smrgvoid pixman_region32_translate (pixman_region32_t *region, 676b4b94579Smrg int x, 677b4b94579Smrg int y); 678f766d2f6Smrg 679f766d2f6SmrgPIXMAN_API 680f766d2f6Smrgpixman_bool_t pixman_region32_copy (pixman_region32_t *dest, 681f766d2f6Smrg const pixman_region32_t *source); 682f766d2f6Smrg 683f766d2f6SmrgPIXMAN_API 684f766d2f6Smrgpixman_bool_t pixman_region32_intersect (pixman_region32_t *new_reg, 685f766d2f6Smrg const pixman_region32_t *reg1, 686f766d2f6Smrg const pixman_region32_t *reg2); 687f766d2f6Smrg 688f766d2f6SmrgPIXMAN_API 689f766d2f6Smrgpixman_bool_t pixman_region32_union (pixman_region32_t *new_reg, 690f766d2f6Smrg const pixman_region32_t *reg1, 691f766d2f6Smrg const pixman_region32_t *reg2); 692f766d2f6Smrg 693f766d2f6SmrgPIXMAN_API 694f766d2f6Smrgpixman_bool_t pixman_region32_intersect_rect (pixman_region32_t *dest, 695f766d2f6Smrg const pixman_region32_t *source, 696f766d2f6Smrg int x, 697f766d2f6Smrg int y, 698f766d2f6Smrg unsigned int width, 699f766d2f6Smrg unsigned int height); 700f766d2f6Smrg 701f766d2f6SmrgPIXMAN_API 702f766d2f6Smrgpixman_bool_t pixman_region32_union_rect (pixman_region32_t *dest, 703f766d2f6Smrg const pixman_region32_t *source, 704f766d2f6Smrg int x, 705f766d2f6Smrg int y, 706f766d2f6Smrg unsigned int width, 707f766d2f6Smrg unsigned int height); 708f766d2f6Smrg 709f766d2f6SmrgPIXMAN_API 710f766d2f6Smrgpixman_bool_t pixman_region32_subtract (pixman_region32_t *reg_d, 711f766d2f6Smrg const pixman_region32_t *reg_m, 712f766d2f6Smrg const pixman_region32_t *reg_s); 713f766d2f6Smrg 714f766d2f6SmrgPIXMAN_API 715f766d2f6Smrgpixman_bool_t pixman_region32_inverse (pixman_region32_t *new_reg, 716f766d2f6Smrg const pixman_region32_t *reg1, 717f766d2f6Smrg const pixman_box32_t *inv_rect); 718f766d2f6Smrg 719f766d2f6SmrgPIXMAN_API 720f766d2f6Smrgpixman_bool_t pixman_region32_contains_point (const pixman_region32_t *region, 721f766d2f6Smrg int x, 722f766d2f6Smrg int y, 723f766d2f6Smrg pixman_box32_t *box); 724f766d2f6Smrg 725f766d2f6SmrgPIXMAN_API 726f766d2f6Smrgpixman_region_overlap_t pixman_region32_contains_rectangle (const pixman_region32_t *region, 727f766d2f6Smrg const pixman_box32_t *prect); 728f766d2f6Smrg 729f766d2f6SmrgPIXMAN_API 730f766d2f6Smrgpixman_bool_t pixman_region32_empty (const pixman_region32_t *region); 731f766d2f6Smrg 732f766d2f6SmrgPIXMAN_API 733f766d2f6Smrgpixman_bool_t pixman_region32_not_empty (const pixman_region32_t *region); 734f766d2f6Smrg 735f766d2f6SmrgPIXMAN_API 736f766d2f6Smrgpixman_box32_t * pixman_region32_extents (const pixman_region32_t *region); 737f766d2f6Smrg 738f766d2f6SmrgPIXMAN_API 739f766d2f6Smrgint pixman_region32_n_rects (const pixman_region32_t *region); 740f766d2f6Smrg 741f766d2f6SmrgPIXMAN_API 742f766d2f6Smrgpixman_box32_t * pixman_region32_rectangles (const pixman_region32_t *region, 743f766d2f6Smrg int *n_rects); 744f766d2f6Smrg 745f766d2f6SmrgPIXMAN_API 746f766d2f6Smrgpixman_bool_t pixman_region32_equal (const pixman_region32_t *region1, 747f766d2f6Smrg const pixman_region32_t *region2); 748f766d2f6Smrg 749f766d2f6SmrgPIXMAN_API 75000c1132bSwizpixman_bool_t pixman_region32_selfcheck (const pixman_region32_t *region); 751f766d2f6Smrg 752f766d2f6SmrgPIXMAN_API 753f766d2f6Smrgvoid pixman_region32_reset (pixman_region32_t *region, 754f766d2f6Smrg const pixman_box32_t *box); 755f766d2f6Smrg 756f766d2f6SmrgPIXMAN_API 75781988197Sjmcneillvoid pixman_region32_clear (pixman_region32_t *region); 758f766d2f6Smrg/* 759f766d2f6Smrg * 64 bit fractional regions 760f766d2f6Smrg */ 761f766d2f6Smrgtypedef struct pixman_region64f_data pixman_region64f_data_t; 762f766d2f6Smrgtypedef struct pixman_box64f pixman_box64f_t; 763f766d2f6Smrgtypedef struct pixman_rectangle64f pixman_rectangle64f_t; 764f766d2f6Smrgtypedef struct pixman_region64f pixman_region64f_t; 765f766d2f6Smrg 766f766d2f6Smrgstruct pixman_region64f_data { 767f766d2f6Smrg long size; 768f766d2f6Smrg long numRects; 769f766d2f6Smrg/* pixman_box64f_t rects[size]; in memory but not explicitly declared */ 770f766d2f6Smrg}; 771f766d2f6Smrg 772f766d2f6Smrgstruct pixman_rectangle64f 773f766d2f6Smrg{ 774f766d2f6Smrg double x, y; 775f766d2f6Smrg double width, height; 776f766d2f6Smrg}; 777f766d2f6Smrg 778f766d2f6Smrgstruct pixman_box64f 779f766d2f6Smrg{ 780f766d2f6Smrg double x1, y1, x2, y2; 781f766d2f6Smrg}; 782f766d2f6Smrg 783f766d2f6Smrgstruct pixman_region64f 784f766d2f6Smrg{ 785f766d2f6Smrg pixman_box64f_t extents; 786f766d2f6Smrg pixman_region64f_data_t *data; 787f766d2f6Smrg}; 788f766d2f6Smrg 789f766d2f6Smrg/* creation/destruction */ 790f766d2f6SmrgPIXMAN_API 791f766d2f6Smrgvoid pixman_region64f_init (pixman_region64f_t *region); 792f766d2f6Smrg 793f766d2f6SmrgPIXMAN_API 794f766d2f6Smrgvoid pixman_region64f_init_rect (pixman_region64f_t *region, 795f766d2f6Smrg int x, 796f766d2f6Smrg int y, 797f766d2f6Smrg unsigned int width, 798f766d2f6Smrg unsigned int height); 799f766d2f6Smrg 800f766d2f6SmrgPIXMAN_API 801f766d2f6Smrgvoid pixman_region64f_init_rectf (pixman_region64f_t *region, 802f766d2f6Smrg double x, 803f766d2f6Smrg double y, 804f766d2f6Smrg double width, 805f766d2f6Smrg double height); 806f766d2f6Smrg 807f766d2f6SmrgPIXMAN_API 808f766d2f6Smrgpixman_bool_t pixman_region64f_init_rects (pixman_region64f_t *region, 809f766d2f6Smrg const pixman_box64f_t *boxes, 810f766d2f6Smrg int count); 811f766d2f6Smrg 812f766d2f6SmrgPIXMAN_API 813f766d2f6Smrgvoid pixman_region64f_init_with_extents (pixman_region64f_t *region, 814f766d2f6Smrg const pixman_box64f_t *extents); 815f766d2f6Smrg 816f766d2f6SmrgPIXMAN_API 817f766d2f6Smrgvoid pixman_region64f_init_from_image (pixman_region64f_t *region, 818f766d2f6Smrg pixman_image_t *image); 819f766d2f6Smrg 820f766d2f6SmrgPIXMAN_API 821f766d2f6Smrgvoid pixman_region64f_fini (pixman_region64f_t *region); 822f766d2f6Smrg 823f766d2f6Smrg 824f766d2f6Smrg/* manipulation */ 825f766d2f6SmrgPIXMAN_API 826f766d2f6Smrgvoid pixman_region64f_translate (pixman_region64f_t *region, 827f766d2f6Smrg int x, 828f766d2f6Smrg int y); 829f766d2f6Smrg 830f766d2f6SmrgPIXMAN_API 831f766d2f6Smrgvoid pixman_region64f_translatef (pixman_region64f_t *region, 832f766d2f6Smrg double x, 833f766d2f6Smrg double y); 834f766d2f6Smrg 835f766d2f6SmrgPIXMAN_API 836f766d2f6Smrgpixman_bool_t pixman_region64f_copy (pixman_region64f_t *dest, 837f766d2f6Smrg const pixman_region64f_t *source); 838f766d2f6Smrg 839f766d2f6SmrgPIXMAN_API 840f766d2f6Smrgpixman_bool_t pixman_region64f_intersect (pixman_region64f_t *new_reg, 841f766d2f6Smrg const pixman_region64f_t *reg1, 842f766d2f6Smrg const pixman_region64f_t *reg2); 843f766d2f6Smrg 844f766d2f6SmrgPIXMAN_API 845f766d2f6Smrgpixman_bool_t pixman_region64f_union (pixman_region64f_t *new_reg, 846f766d2f6Smrg const pixman_region64f_t *reg1, 847f766d2f6Smrg const pixman_region64f_t *reg2); 848f766d2f6Smrg 849f766d2f6SmrgPIXMAN_API 850f766d2f6Smrgpixman_bool_t pixman_region64f_intersect_rect (pixman_region64f_t *dest, 851f766d2f6Smrg const pixman_region64f_t *source, 852f766d2f6Smrg int x, 853f766d2f6Smrg int y, 854f766d2f6Smrg unsigned int width, 855f766d2f6Smrg unsigned int height); 856f766d2f6Smrg 857f766d2f6SmrgPIXMAN_API 858f766d2f6Smrgpixman_bool_t pixman_region64f_intersect_rectf (pixman_region64f_t *dest, 859f766d2f6Smrg const pixman_region64f_t *source, 860f766d2f6Smrg double x, 861f766d2f6Smrg double y, 862f766d2f6Smrg double width, 863f766d2f6Smrg double height); 864f766d2f6Smrg 865f766d2f6SmrgPIXMAN_API 866f766d2f6Smrgpixman_bool_t pixman_region64f_union_rect (pixman_region64f_t *dest, 867f766d2f6Smrg const pixman_region64f_t *source, 868f766d2f6Smrg int x, 869f766d2f6Smrg int y, 870f766d2f6Smrg unsigned int width, 871f766d2f6Smrg unsigned int height); 872f766d2f6Smrg 873f766d2f6SmrgPIXMAN_API 874f766d2f6Smrgpixman_bool_t pixman_region64f_union_rectf (pixman_region64f_t *dest, 875f766d2f6Smrg const pixman_region64f_t *source, 876f766d2f6Smrg double x, 877f766d2f6Smrg double y, 878f766d2f6Smrg double width, 879f766d2f6Smrg double height); 880f766d2f6Smrg 881f766d2f6SmrgPIXMAN_API 882f766d2f6Smrgpixman_bool_t pixman_region64f_subtract (pixman_region64f_t *reg_d, 883f766d2f6Smrg const pixman_region64f_t *reg_m, 884f766d2f6Smrg const pixman_region64f_t *reg_s); 885f766d2f6Smrg 886f766d2f6SmrgPIXMAN_API 887f766d2f6Smrgpixman_bool_t pixman_region64f_inverse (pixman_region64f_t *new_reg, 888f766d2f6Smrg const pixman_region64f_t *reg1, 889f766d2f6Smrg const pixman_box64f_t *inv_rect); 890f766d2f6Smrg 891f766d2f6SmrgPIXMAN_API 892f766d2f6Smrgpixman_bool_t pixman_region64f_contains_point (const pixman_region64f_t *region, 893f766d2f6Smrg int x, 894f766d2f6Smrg int y, 895f766d2f6Smrg pixman_box64f_t *box); 896f766d2f6Smrg 897f766d2f6SmrgPIXMAN_API 898f766d2f6Smrgpixman_bool_t pixman_region64f_contains_pointf (const pixman_region64f_t *region, 899f766d2f6Smrg double x, 900f766d2f6Smrg double y, 901f766d2f6Smrg pixman_box64f_t *box); 902f766d2f6Smrg 903f766d2f6SmrgPIXMAN_API 904f766d2f6Smrgpixman_region_overlap_t pixman_region64f_contains_rectangle(const pixman_region64f_t *region, 905f766d2f6Smrg const pixman_box64f_t *prect); 906f766d2f6Smrg 907f766d2f6SmrgPIXMAN_API 908f766d2f6Smrgpixman_bool_t pixman_region64f_empty (const pixman_region64f_t *region); 909f766d2f6Smrg 910f766d2f6SmrgPIXMAN_API 911f766d2f6Smrgpixman_bool_t pixman_region64f_not_empty (const pixman_region64f_t *region); 912f766d2f6Smrg 913f766d2f6SmrgPIXMAN_API 914f766d2f6Smrgpixman_box64f_t * pixman_region64f_extents (const pixman_region64f_t *region); 915f766d2f6Smrg 916f766d2f6SmrgPIXMAN_API 917f766d2f6Smrgint pixman_region64f_n_rects (const pixman_region64f_t *region); 918f766d2f6Smrg 919f766d2f6SmrgPIXMAN_API 920f766d2f6Smrgpixman_box64f_t * pixman_region64f_rectangles (const pixman_region64f_t *region, 921f766d2f6Smrg int *n_rects); 922f766d2f6Smrg 923f766d2f6SmrgPIXMAN_API 924f766d2f6Smrgpixman_bool_t pixman_region64f_equal (const pixman_region64f_t *region1, 925f766d2f6Smrg const pixman_region64f_t *region2); 926f766d2f6Smrg 927f766d2f6SmrgPIXMAN_API 92800c1132bSwizpixman_bool_t pixman_region64f_selfcheck (const pixman_region64f_t *region); 929f766d2f6Smrg 930f766d2f6SmrgPIXMAN_API 931f766d2f6Smrgvoid pixman_region64f_reset (pixman_region64f_t *region, 932f766d2f6Smrg const pixman_box64f_t *box); 933f766d2f6Smrg 934f766d2f6SmrgPIXMAN_API 935f766d2f6Smrgvoid pixman_region64f_clear (pixman_region64f_t *region); 936b4b94579Smrg 937b4b94579Smrg 938b4b94579Smrg/* Copy / Fill / Misc */ 939f766d2f6SmrgPIXMAN_API 940b4b94579Smrgpixman_bool_t pixman_blt (uint32_t *src_bits, 941b4b94579Smrg uint32_t *dst_bits, 942b4b94579Smrg int src_stride, 943b4b94579Smrg int dst_stride, 944b4b94579Smrg int src_bpp, 945b4b94579Smrg int dst_bpp, 946b4b94579Smrg int src_x, 947b4b94579Smrg int src_y, 9486ba797d6Smrg int dest_x, 9496ba797d6Smrg int dest_y, 950b4b94579Smrg int width, 951b4b94579Smrg int height); 952f766d2f6Smrg 953f766d2f6SmrgPIXMAN_API 954b4b94579Smrgpixman_bool_t pixman_fill (uint32_t *bits, 955b4b94579Smrg int stride, 956b4b94579Smrg int bpp, 957b4b94579Smrg int x, 958b4b94579Smrg int y, 959b4b94579Smrg int width, 960b4b94579Smrg int height, 961b4b94579Smrg uint32_t _xor); 962b4b94579Smrg 963f766d2f6Smrg 964f766d2f6SmrgPIXMAN_API 965b4b94579Smrgint pixman_version (void); 966f766d2f6Smrg 967f766d2f6SmrgPIXMAN_API 968b4b94579Smrgconst char* pixman_version_string (void); 969b4b94579Smrg 970b4b94579Smrg/* 971b4b94579Smrg * Images 972b4b94579Smrg */ 973b4b94579Smrgtypedef struct pixman_indexed pixman_indexed_t; 974b4b94579Smrgtypedef struct pixman_gradient_stop pixman_gradient_stop_t; 975b4b94579Smrg 976b4b94579Smrgtypedef uint32_t (* pixman_read_memory_func_t) (const void *src, int size); 977b4b94579Smrgtypedef void (* pixman_write_memory_func_t) (void *dst, uint32_t value, int size); 978b4b94579Smrg 979dc259aabSmrgtypedef void (* pixman_image_destroy_func_t) (pixman_image_t *image, void *data); 980dc259aabSmrg 981b4b94579Smrgstruct pixman_gradient_stop { 982b4b94579Smrg pixman_fixed_t x; 983b4b94579Smrg pixman_color_t color; 984b4b94579Smrg}; 985b4b94579Smrg 986b4b94579Smrg#define PIXMAN_MAX_INDEXED 256 /* XXX depth must be <= 8 */ 987b4b94579Smrg 988b4b94579Smrg#if PIXMAN_MAX_INDEXED <= 256 989b4b94579Smrgtypedef uint8_t pixman_index_type; 990b4b94579Smrg#endif 991b4b94579Smrg 992b4b94579Smrgstruct pixman_indexed 993b4b94579Smrg{ 994b4b94579Smrg pixman_bool_t color; 995b4b94579Smrg uint32_t rgba[PIXMAN_MAX_INDEXED]; 996b4b94579Smrg pixman_index_type ent[32768]; 997b4b94579Smrg}; 998b4b94579Smrg 999b4b94579Smrg/* 1000b4b94579Smrg * While the protocol is generous in format support, the 1001b4b94579Smrg * sample implementation allows only packed RGB and GBR 1002b4b94579Smrg * representations for data to simplify software rendering, 1003b4b94579Smrg */ 1004b4b94579Smrg#define PIXMAN_FORMAT(bpp,type,a,r,g,b) (((bpp) << 24) | \ 1005b4b94579Smrg ((type) << 16) | \ 1006b4b94579Smrg ((a) << 12) | \ 1007b4b94579Smrg ((r) << 8) | \ 1008b4b94579Smrg ((g) << 4) | \ 1009b4b94579Smrg ((b))) 1010b4b94579Smrg 10117fb3d851Smrg#define PIXMAN_FORMAT_BYTE(bpp,type,a,r,g,b) \ 10127fb3d851Smrg (((bpp >> 3) << 24) | \ 10137fb3d851Smrg (3 << 22) | ((type) << 16) | \ 10147fb3d851Smrg ((a >> 3) << 12) | \ 10157fb3d851Smrg ((r >> 3) << 8) | \ 10167fb3d851Smrg ((g >> 3) << 4) | \ 10177fb3d851Smrg ((b >> 3))) 10187fb3d851Smrg 10197fb3d851Smrg#define PIXMAN_FORMAT_RESHIFT(val, ofs, num) \ 10207fb3d851Smrg (((val >> (ofs)) & ((1 << (num)) - 1)) << ((val >> 22) & 3)) 10217fb3d851Smrg 10227fb3d851Smrg#define PIXMAN_FORMAT_BPP(f) PIXMAN_FORMAT_RESHIFT(f, 24, 8) 10237fb3d851Smrg#define PIXMAN_FORMAT_SHIFT(f) ((uint32_t)((f >> 22) & 3)) 10247fb3d851Smrg#define PIXMAN_FORMAT_TYPE(f) (((f) >> 16) & 0x3f) 10257fb3d851Smrg#define PIXMAN_FORMAT_A(f) PIXMAN_FORMAT_RESHIFT(f, 12, 4) 10267fb3d851Smrg#define PIXMAN_FORMAT_R(f) PIXMAN_FORMAT_RESHIFT(f, 8, 4) 10277fb3d851Smrg#define PIXMAN_FORMAT_G(f) PIXMAN_FORMAT_RESHIFT(f, 4, 4) 10287fb3d851Smrg#define PIXMAN_FORMAT_B(f) PIXMAN_FORMAT_RESHIFT(f, 0, 4) 1029b4b94579Smrg#define PIXMAN_FORMAT_RGB(f) (((f) ) & 0xfff) 1030b4b94579Smrg#define PIXMAN_FORMAT_VIS(f) (((f) ) & 0xffff) 1031b4b94579Smrg#define PIXMAN_FORMAT_DEPTH(f) (PIXMAN_FORMAT_A(f) + \ 1032b4b94579Smrg PIXMAN_FORMAT_R(f) + \ 1033b4b94579Smrg PIXMAN_FORMAT_G(f) + \ 1034b4b94579Smrg PIXMAN_FORMAT_B(f)) 1035b4b94579Smrg 1036b4b94579Smrg#define PIXMAN_TYPE_OTHER 0 1037b4b94579Smrg#define PIXMAN_TYPE_A 1 1038b4b94579Smrg#define PIXMAN_TYPE_ARGB 2 1039b4b94579Smrg#define PIXMAN_TYPE_ABGR 3 1040b4b94579Smrg#define PIXMAN_TYPE_COLOR 4 1041b4b94579Smrg#define PIXMAN_TYPE_GRAY 5 1042b4b94579Smrg#define PIXMAN_TYPE_YUY2 6 1043b4b94579Smrg#define PIXMAN_TYPE_YV12 7 1044317c648bSmrg#define PIXMAN_TYPE_BGRA 8 10456ba797d6Smrg#define PIXMAN_TYPE_RGBA 9 104681988197Sjmcneill#define PIXMAN_TYPE_ARGB_SRGB 10 10477fb3d851Smrg#define PIXMAN_TYPE_RGBA_FLOAT 11 1048b4b94579Smrg 1049317c648bSmrg#define PIXMAN_FORMAT_COLOR(f) \ 1050317c648bSmrg (PIXMAN_FORMAT_TYPE(f) == PIXMAN_TYPE_ARGB || \ 1051317c648bSmrg PIXMAN_FORMAT_TYPE(f) == PIXMAN_TYPE_ABGR || \ 10526ba797d6Smrg PIXMAN_FORMAT_TYPE(f) == PIXMAN_TYPE_BGRA || \ 10537fb3d851Smrg PIXMAN_FORMAT_TYPE(f) == PIXMAN_TYPE_RGBA || \ 10547fb3d851Smrg PIXMAN_FORMAT_TYPE(f) == PIXMAN_TYPE_RGBA_FLOAT) 1055b4b94579Smrg 1056b4b94579Smrgtypedef enum { 10577fb3d851Smrg/* 128bpp formats */ 10587fb3d851Smrg PIXMAN_rgba_float = PIXMAN_FORMAT_BYTE(128,PIXMAN_TYPE_RGBA_FLOAT,32,32,32,32), 10597fb3d851Smrg/* 96bpp formats */ 10607fb3d851Smrg PIXMAN_rgb_float = PIXMAN_FORMAT_BYTE(96,PIXMAN_TYPE_RGBA_FLOAT,0,32,32,32), 10617fb3d851Smrg 1062f766d2f6Smrg/* 64bpp formats */ 1063f766d2f6Smrg /* [63:0] A:B:G:R 16:16:16:16 native endian */ 1064f766d2f6Smrg PIXMAN_a16b16g16r16 = PIXMAN_FORMAT_BYTE(64,PIXMAN_TYPE_ABGR,16,16,16,16), 1065f766d2f6Smrg 10667fb3d851Smrg/* 32bpp formats */ 1067d0321353Smrg PIXMAN_a8r8g8b8 = PIXMAN_FORMAT(32,PIXMAN_TYPE_ARGB,8,8,8,8), 1068d0321353Smrg PIXMAN_x8r8g8b8 = PIXMAN_FORMAT(32,PIXMAN_TYPE_ARGB,0,8,8,8), 1069d0321353Smrg PIXMAN_a8b8g8r8 = PIXMAN_FORMAT(32,PIXMAN_TYPE_ABGR,8,8,8,8), 1070d0321353Smrg PIXMAN_x8b8g8r8 = PIXMAN_FORMAT(32,PIXMAN_TYPE_ABGR,0,8,8,8), 1071d0321353Smrg PIXMAN_b8g8r8a8 = PIXMAN_FORMAT(32,PIXMAN_TYPE_BGRA,8,8,8,8), 1072d0321353Smrg PIXMAN_b8g8r8x8 = PIXMAN_FORMAT(32,PIXMAN_TYPE_BGRA,0,8,8,8), 10736ba797d6Smrg PIXMAN_r8g8b8a8 = PIXMAN_FORMAT(32,PIXMAN_TYPE_RGBA,8,8,8,8), 10746ba797d6Smrg PIXMAN_r8g8b8x8 = PIXMAN_FORMAT(32,PIXMAN_TYPE_RGBA,0,8,8,8), 10751b18d63aSmrg PIXMAN_x14r6g6b6 = PIXMAN_FORMAT(32,PIXMAN_TYPE_ARGB,0,6,6,6), 1076d0321353Smrg PIXMAN_x2r10g10b10 = PIXMAN_FORMAT(32,PIXMAN_TYPE_ARGB,0,10,10,10), 1077d0321353Smrg PIXMAN_a2r10g10b10 = PIXMAN_FORMAT(32,PIXMAN_TYPE_ARGB,2,10,10,10), 107827693ee9Sveego PIXMAN_x2b10g10r10 = PIXMAN_FORMAT(32,PIXMAN_TYPE_ABGR,0,10,10,10), 107927693ee9Sveego PIXMAN_a2b10g10r10 = PIXMAN_FORMAT(32,PIXMAN_TYPE_ABGR,2,10,10,10), 108027693ee9Sveego 108181988197Sjmcneill/* sRGB formats */ 108281988197Sjmcneill PIXMAN_a8r8g8b8_sRGB = PIXMAN_FORMAT(32,PIXMAN_TYPE_ARGB_SRGB,8,8,8,8), 1083f766d2f6Smrg PIXMAN_r8g8b8_sRGB = PIXMAN_FORMAT(24,PIXMAN_TYPE_ARGB_SRGB,0,8,8,8), 108481988197Sjmcneill 1085b4b94579Smrg/* 24bpp formats */ 1086d0321353Smrg PIXMAN_r8g8b8 = PIXMAN_FORMAT(24,PIXMAN_TYPE_ARGB,0,8,8,8), 1087d0321353Smrg PIXMAN_b8g8r8 = PIXMAN_FORMAT(24,PIXMAN_TYPE_ABGR,0,8,8,8), 1088952204abSmrg 1089b4b94579Smrg/* 16bpp formats */ 1090d0321353Smrg PIXMAN_r5g6b5 = PIXMAN_FORMAT(16,PIXMAN_TYPE_ARGB,0,5,6,5), 1091d0321353Smrg PIXMAN_b5g6r5 = PIXMAN_FORMAT(16,PIXMAN_TYPE_ABGR,0,5,6,5), 1092952204abSmrg 1093d0321353Smrg PIXMAN_a1r5g5b5 = PIXMAN_FORMAT(16,PIXMAN_TYPE_ARGB,1,5,5,5), 1094d0321353Smrg PIXMAN_x1r5g5b5 = PIXMAN_FORMAT(16,PIXMAN_TYPE_ARGB,0,5,5,5), 1095d0321353Smrg PIXMAN_a1b5g5r5 = PIXMAN_FORMAT(16,PIXMAN_TYPE_ABGR,1,5,5,5), 1096d0321353Smrg PIXMAN_x1b5g5r5 = PIXMAN_FORMAT(16,PIXMAN_TYPE_ABGR,0,5,5,5), 1097d0321353Smrg PIXMAN_a4r4g4b4 = PIXMAN_FORMAT(16,PIXMAN_TYPE_ARGB,4,4,4,4), 1098d0321353Smrg PIXMAN_x4r4g4b4 = PIXMAN_FORMAT(16,PIXMAN_TYPE_ARGB,0,4,4,4), 1099d0321353Smrg PIXMAN_a4b4g4r4 = PIXMAN_FORMAT(16,PIXMAN_TYPE_ABGR,4,4,4,4), 1100d0321353Smrg PIXMAN_x4b4g4r4 = PIXMAN_FORMAT(16,PIXMAN_TYPE_ABGR,0,4,4,4), 1101952204abSmrg 1102b4b94579Smrg/* 8bpp formats */ 1103d0321353Smrg PIXMAN_a8 = PIXMAN_FORMAT(8,PIXMAN_TYPE_A,8,0,0,0), 1104d0321353Smrg PIXMAN_r3g3b2 = PIXMAN_FORMAT(8,PIXMAN_TYPE_ARGB,0,3,3,2), 1105d0321353Smrg PIXMAN_b2g3r3 = PIXMAN_FORMAT(8,PIXMAN_TYPE_ABGR,0,3,3,2), 1106d0321353Smrg PIXMAN_a2r2g2b2 = PIXMAN_FORMAT(8,PIXMAN_TYPE_ARGB,2,2,2,2), 1107d0321353Smrg PIXMAN_a2b2g2r2 = PIXMAN_FORMAT(8,PIXMAN_TYPE_ABGR,2,2,2,2), 1108952204abSmrg 1109d0321353Smrg PIXMAN_c8 = PIXMAN_FORMAT(8,PIXMAN_TYPE_COLOR,0,0,0,0), 1110d0321353Smrg PIXMAN_g8 = PIXMAN_FORMAT(8,PIXMAN_TYPE_GRAY,0,0,0,0), 1111952204abSmrg 1112d0321353Smrg PIXMAN_x4a4 = PIXMAN_FORMAT(8,PIXMAN_TYPE_A,4,0,0,0), 1113952204abSmrg 1114d0321353Smrg PIXMAN_x4c4 = PIXMAN_FORMAT(8,PIXMAN_TYPE_COLOR,0,0,0,0), 1115d0321353Smrg PIXMAN_x4g4 = PIXMAN_FORMAT(8,PIXMAN_TYPE_GRAY,0,0,0,0), 1116952204abSmrg 1117b4b94579Smrg/* 4bpp formats */ 1118d0321353Smrg PIXMAN_a4 = PIXMAN_FORMAT(4,PIXMAN_TYPE_A,4,0,0,0), 1119d0321353Smrg PIXMAN_r1g2b1 = PIXMAN_FORMAT(4,PIXMAN_TYPE_ARGB,0,1,2,1), 1120d0321353Smrg PIXMAN_b1g2r1 = PIXMAN_FORMAT(4,PIXMAN_TYPE_ABGR,0,1,2,1), 1121d0321353Smrg PIXMAN_a1r1g1b1 = PIXMAN_FORMAT(4,PIXMAN_TYPE_ARGB,1,1,1,1), 1122d0321353Smrg PIXMAN_a1b1g1r1 = PIXMAN_FORMAT(4,PIXMAN_TYPE_ABGR,1,1,1,1), 1123952204abSmrg 1124d0321353Smrg PIXMAN_c4 = PIXMAN_FORMAT(4,PIXMAN_TYPE_COLOR,0,0,0,0), 1125d0321353Smrg PIXMAN_g4 = PIXMAN_FORMAT(4,PIXMAN_TYPE_GRAY,0,0,0,0), 1126952204abSmrg 1127b4b94579Smrg/* 1bpp formats */ 1128d0321353Smrg PIXMAN_a1 = PIXMAN_FORMAT(1,PIXMAN_TYPE_A,1,0,0,0), 1129952204abSmrg 1130d0321353Smrg PIXMAN_g1 = PIXMAN_FORMAT(1,PIXMAN_TYPE_GRAY,0,0,0,0), 1131b4b94579Smrg 1132b4b94579Smrg/* YUV formats */ 1133d0321353Smrg PIXMAN_yuy2 = PIXMAN_FORMAT(16,PIXMAN_TYPE_YUY2,0,0,0,0), 1134d0321353Smrg PIXMAN_yv12 = PIXMAN_FORMAT(12,PIXMAN_TYPE_YV12,0,0,0,0) 1135b4b94579Smrg} pixman_format_code_t; 1136b4b94579Smrg 1137b4b94579Smrg/* Querying supported format values. */ 1138f766d2f6SmrgPIXMAN_API 1139b4b94579Smrgpixman_bool_t pixman_format_supported_destination (pixman_format_code_t format); 1140f766d2f6Smrg 1141f766d2f6SmrgPIXMAN_API 1142b4b94579Smrgpixman_bool_t pixman_format_supported_source (pixman_format_code_t format); 1143b4b94579Smrg 1144b4b94579Smrg/* Constructors */ 1145f766d2f6SmrgPIXMAN_API 114681988197Sjmcneillpixman_image_t *pixman_image_create_solid_fill (const pixman_color_t *color); 1147f766d2f6Smrg 1148f766d2f6SmrgPIXMAN_API 114981988197Sjmcneillpixman_image_t *pixman_image_create_linear_gradient (const pixman_point_fixed_t *p1, 115081988197Sjmcneill const pixman_point_fixed_t *p2, 1151b4b94579Smrg const pixman_gradient_stop_t *stops, 1152b4b94579Smrg int n_stops); 1153f766d2f6Smrg 1154f766d2f6SmrgPIXMAN_API 115581988197Sjmcneillpixman_image_t *pixman_image_create_radial_gradient (const pixman_point_fixed_t *inner, 115681988197Sjmcneill const pixman_point_fixed_t *outer, 1157b4b94579Smrg pixman_fixed_t inner_radius, 1158b4b94579Smrg pixman_fixed_t outer_radius, 1159b4b94579Smrg const pixman_gradient_stop_t *stops, 1160b4b94579Smrg int n_stops); 1161f766d2f6Smrg 1162f766d2f6SmrgPIXMAN_API 116381988197Sjmcneillpixman_image_t *pixman_image_create_conical_gradient (const pixman_point_fixed_t *center, 1164b4b94579Smrg pixman_fixed_t angle, 1165b4b94579Smrg const pixman_gradient_stop_t *stops, 1166b4b94579Smrg int n_stops); 1167f766d2f6Smrg 1168f766d2f6SmrgPIXMAN_API 1169b4b94579Smrgpixman_image_t *pixman_image_create_bits (pixman_format_code_t format, 1170b4b94579Smrg int width, 1171b4b94579Smrg int height, 1172b4b94579Smrg uint32_t *bits, 1173b4b94579Smrg int rowstride_bytes); 1174f766d2f6Smrg 1175f766d2f6SmrgPIXMAN_API 117681988197Sjmcneillpixman_image_t *pixman_image_create_bits_no_clear (pixman_format_code_t format, 117781988197Sjmcneill int width, 117881988197Sjmcneill int height, 117981988197Sjmcneill uint32_t * bits, 118081988197Sjmcneill int rowstride_bytes); 1181b4b94579Smrg 1182b4b94579Smrg/* Destructor */ 1183f766d2f6SmrgPIXMAN_API 1184b4b94579Smrgpixman_image_t *pixman_image_ref (pixman_image_t *image); 1185f766d2f6Smrg 1186f766d2f6SmrgPIXMAN_API 1187b4b94579Smrgpixman_bool_t pixman_image_unref (pixman_image_t *image); 1188b4b94579Smrg 1189f766d2f6Smrg 1190f766d2f6SmrgPIXMAN_API 1191dc259aabSmrgvoid pixman_image_set_destroy_function (pixman_image_t *image, 1192dc259aabSmrg pixman_image_destroy_func_t function, 1193dc259aabSmrg void *data); 1194f766d2f6Smrg 1195f766d2f6SmrgPIXMAN_API 1196952204abSmrgvoid * pixman_image_get_destroy_data (pixman_image_t *image); 1197b4b94579Smrg 1198b4b94579Smrg/* Set properties */ 1199f766d2f6SmrgPIXMAN_API 1200b4b94579Smrgpixman_bool_t pixman_image_set_clip_region (pixman_image_t *image, 1201f766d2f6Smrg const pixman_region16_t *region); 1202f766d2f6Smrg 1203f766d2f6SmrgPIXMAN_API 1204b4b94579Smrgpixman_bool_t pixman_image_set_clip_region32 (pixman_image_t *image, 1205f766d2f6Smrg const pixman_region32_t *region); 1206f766d2f6Smrg 1207f766d2f6SmrgPIXMAN_API 1208f766d2f6Smrgpixman_bool_t pixman_image_set_clip_region64f (pixman_image_t *image, 1209f766d2f6Smrg const pixman_region64f_t *region); 1210f766d2f6Smrg 1211f766d2f6SmrgPIXMAN_API 1212b4b94579Smrgvoid pixman_image_set_has_client_clip (pixman_image_t *image, 1213b4b94579Smrg pixman_bool_t clien_clip); 1214f766d2f6Smrg 1215f766d2f6SmrgPIXMAN_API 1216b4b94579Smrgpixman_bool_t pixman_image_set_transform (pixman_image_t *image, 1217b4b94579Smrg const pixman_transform_t *transform); 1218f766d2f6Smrg 1219f766d2f6SmrgPIXMAN_API 1220b4b94579Smrgvoid pixman_image_set_repeat (pixman_image_t *image, 1221b4b94579Smrg pixman_repeat_t repeat); 1222f766d2f6Smrg 1223f766d2f6SmrgPIXMAN_API 1224f766d2f6Smrgvoid pixman_image_set_dither (pixman_image_t *image, 1225f766d2f6Smrg pixman_dither_t dither); 1226f766d2f6Smrg 1227f766d2f6SmrgPIXMAN_API 1228f766d2f6Smrgvoid pixman_image_set_dither_offset (pixman_image_t *image, 1229f766d2f6Smrg int offset_x, 1230f766d2f6Smrg int offset_y); 1231f766d2f6Smrg 1232f766d2f6SmrgPIXMAN_API 1233b4b94579Smrgpixman_bool_t pixman_image_set_filter (pixman_image_t *image, 1234b4b94579Smrg pixman_filter_t filter, 1235b4b94579Smrg const pixman_fixed_t *filter_params, 1236b4b94579Smrg int n_filter_params); 1237f766d2f6Smrg 1238f766d2f6SmrgPIXMAN_API 1239b4b94579Smrgvoid pixman_image_set_source_clipping (pixman_image_t *image, 1240b4b94579Smrg pixman_bool_t source_clipping); 1241f766d2f6Smrg 1242f766d2f6SmrgPIXMAN_API 1243b4b94579Smrgvoid pixman_image_set_alpha_map (pixman_image_t *image, 1244b4b94579Smrg pixman_image_t *alpha_map, 1245b4b94579Smrg int16_t x, 1246b4b94579Smrg int16_t y); 1247f766d2f6Smrg 1248f766d2f6SmrgPIXMAN_API 1249b4b94579Smrgvoid pixman_image_set_component_alpha (pixman_image_t *image, 1250b4b94579Smrg pixman_bool_t component_alpha); 1251f766d2f6Smrg 1252f766d2f6SmrgPIXMAN_API 12531b18d63aSmrgpixman_bool_t pixman_image_get_component_alpha (pixman_image_t *image); 1254f766d2f6Smrg 1255f766d2f6SmrgPIXMAN_API 1256b4b94579Smrgvoid pixman_image_set_accessors (pixman_image_t *image, 1257b4b94579Smrg pixman_read_memory_func_t read_func, 1258b4b94579Smrg pixman_write_memory_func_t write_func); 1259f766d2f6Smrg 1260f766d2f6SmrgPIXMAN_API 1261b4b94579Smrgvoid pixman_image_set_indexed (pixman_image_t *image, 1262b4b94579Smrg const pixman_indexed_t *indexed); 1263f766d2f6Smrg 1264f766d2f6SmrgPIXMAN_API 1265b4b94579Smrguint32_t *pixman_image_get_data (pixman_image_t *image); 1266f766d2f6Smrg 1267f766d2f6SmrgPIXMAN_API 1268b4b94579Smrgint pixman_image_get_width (pixman_image_t *image); 1269f766d2f6Smrg 1270f766d2f6SmrgPIXMAN_API 1271b4b94579Smrgint pixman_image_get_height (pixman_image_t *image); 1272f766d2f6Smrg 1273f766d2f6SmrgPIXMAN_API 1274317c648bSmrgint pixman_image_get_stride (pixman_image_t *image); /* in bytes */ 1275f766d2f6Smrg 1276f766d2f6SmrgPIXMAN_API 1277b4b94579Smrgint pixman_image_get_depth (pixman_image_t *image); 1278f766d2f6Smrg 1279f766d2f6SmrgPIXMAN_API 12801b18d63aSmrgpixman_format_code_t pixman_image_get_format (pixman_image_t *image); 12819a0cb412Smrg 12829a0cb412Smrgtypedef enum 12839a0cb412Smrg{ 12849a0cb412Smrg PIXMAN_KERNEL_IMPULSE, 12859a0cb412Smrg PIXMAN_KERNEL_BOX, 12869a0cb412Smrg PIXMAN_KERNEL_LINEAR, 12879a0cb412Smrg PIXMAN_KERNEL_CUBIC, 12889a0cb412Smrg PIXMAN_KERNEL_GAUSSIAN, 12899a0cb412Smrg PIXMAN_KERNEL_LANCZOS2, 12909a0cb412Smrg PIXMAN_KERNEL_LANCZOS3, 12919a0cb412Smrg PIXMAN_KERNEL_LANCZOS3_STRETCHED /* Jim Blinn's 'nice' filter */ 12929a0cb412Smrg} pixman_kernel_t; 12939a0cb412Smrg 12949a0cb412Smrg/* Create the parameter list for a SEPARABLE_CONVOLUTION filter 12959a0cb412Smrg * with the given kernels and scale parameters. 12969a0cb412Smrg */ 1297f766d2f6SmrgPIXMAN_API 12989a0cb412Smrgpixman_fixed_t * 12999a0cb412Smrgpixman_filter_create_separable_convolution (int *n_values, 13009a0cb412Smrg pixman_fixed_t scale_x, 13019a0cb412Smrg pixman_fixed_t scale_y, 13029a0cb412Smrg pixman_kernel_t reconstruct_x, 13039a0cb412Smrg pixman_kernel_t reconstruct_y, 13049a0cb412Smrg pixman_kernel_t sample_x, 13059a0cb412Smrg pixman_kernel_t sample_y, 13069a0cb412Smrg int subsample_bits_x, 13079a0cb412Smrg int subsample_bits_y); 13089a0cb412Smrg 1309f766d2f6Smrg 1310f766d2f6SmrgPIXMAN_API 1311b4b94579Smrgpixman_bool_t pixman_image_fill_rectangles (pixman_op_t op, 1312b4b94579Smrg pixman_image_t *image, 131381988197Sjmcneill const pixman_color_t *color, 1314b4b94579Smrg int n_rects, 1315b4b94579Smrg const pixman_rectangle16_t *rects); 1316f766d2f6Smrg 1317f766d2f6SmrgPIXMAN_API 1318952204abSmrgpixman_bool_t pixman_image_fill_boxes (pixman_op_t op, 1319952204abSmrg pixman_image_t *dest, 132081988197Sjmcneill const pixman_color_t *color, 1321952204abSmrg int n_boxes, 1322952204abSmrg const pixman_box32_t *boxes); 1323b4b94579Smrg 1324b4b94579Smrg/* Composite */ 1325f766d2f6SmrgPIXMAN_API 1326d0321353Smrgpixman_bool_t pixman_compute_composite_region (pixman_region16_t *region, 1327d0321353Smrg pixman_image_t *src_image, 1328d0321353Smrg pixman_image_t *mask_image, 13296ba797d6Smrg pixman_image_t *dest_image, 1330d0321353Smrg int16_t src_x, 1331d0321353Smrg int16_t src_y, 1332d0321353Smrg int16_t mask_x, 1333d0321353Smrg int16_t mask_y, 1334d0321353Smrg int16_t dest_x, 1335d0321353Smrg int16_t dest_y, 1336b4b94579Smrg uint16_t width, 1337b4b94579Smrg uint16_t height); 1338f766d2f6Smrg 1339f766d2f6SmrgPIXMAN_API 1340b4b94579Smrgvoid pixman_image_composite (pixman_op_t op, 1341b4b94579Smrg pixman_image_t *src, 1342b4b94579Smrg pixman_image_t *mask, 1343b4b94579Smrg pixman_image_t *dest, 1344b4b94579Smrg int16_t src_x, 1345b4b94579Smrg int16_t src_y, 1346b4b94579Smrg int16_t mask_x, 1347b4b94579Smrg int16_t mask_y, 1348b4b94579Smrg int16_t dest_x, 1349b4b94579Smrg int16_t dest_y, 1350b4b94579Smrg uint16_t width, 1351b4b94579Smrg uint16_t height); 1352f766d2f6Smrg 1353f766d2f6SmrgPIXMAN_API 1354952204abSmrgvoid pixman_image_composite32 (pixman_op_t op, 1355952204abSmrg pixman_image_t *src, 1356952204abSmrg pixman_image_t *mask, 1357952204abSmrg pixman_image_t *dest, 1358952204abSmrg int32_t src_x, 1359952204abSmrg int32_t src_y, 1360952204abSmrg int32_t mask_x, 1361952204abSmrg int32_t mask_y, 1362952204abSmrg int32_t dest_x, 1363952204abSmrg int32_t dest_y, 1364952204abSmrg int32_t width, 1365952204abSmrg int32_t height); 1366b4b94579Smrg 1367f766d2f6SmrgPIXMAN_API 1368f766d2f6Smrgvoid pixman_image_composite64f (pixman_op_t op, 1369f766d2f6Smrg pixman_image_t *src, 1370f766d2f6Smrg pixman_image_t *mask, 1371f766d2f6Smrg pixman_image_t *dest, 1372f766d2f6Smrg double src_x, 1373f766d2f6Smrg double src_y, 1374f766d2f6Smrg double mask_x, 1375f766d2f6Smrg double mask_y, 1376f766d2f6Smrg double dest_x, 1377f766d2f6Smrg double dest_y, 1378f766d2f6Smrg double width, 1379f766d2f6Smrg double height); 1380f766d2f6Smrg 13811b18d63aSmrg/* Executive Summary: This function is a no-op that only exists 13821b18d63aSmrg * for historical reasons. 13831b18d63aSmrg * 13841b18d63aSmrg * There used to be a bug in the X server where it would rely on 13851b18d63aSmrg * out-of-bounds accesses when it was asked to composite with a 13861b18d63aSmrg * window as the source. It would create a pixman image pointing 13871b18d63aSmrg * to some bogus position in memory, but then set a clip region 13881b18d63aSmrg * to the position where the actual bits were. 1389d0321353Smrg * 1390d0321353Smrg * Due to a bug in old versions of pixman, where it would not clip 1391d0321353Smrg * against the image bounds when a clip region was set, this would 13921b18d63aSmrg * actually work. So when the pixman bug was fixed, a workaround was 13931b18d63aSmrg * added to allow certain out-of-bound accesses. This function disabled 13941b18d63aSmrg * those workarounds. 1395d0321353Smrg * 13961b18d63aSmrg * Since 0.21.2, pixman doesn't do these workarounds anymore, so now this 13971b18d63aSmrg * function is a no-op. 1398d0321353Smrg */ 1399f766d2f6SmrgPIXMAN_API 14001b18d63aSmrgvoid pixman_disable_out_of_bounds_workaround (void); 1401d0321353Smrg 140281988197Sjmcneill/* 140381988197Sjmcneill * Glyphs 140481988197Sjmcneill */ 140581988197Sjmcneilltypedef struct pixman_glyph_cache_t pixman_glyph_cache_t; 140681988197Sjmcneilltypedef struct 140781988197Sjmcneill{ 140881988197Sjmcneill int x, y; 140981988197Sjmcneill const void *glyph; 141081988197Sjmcneill} pixman_glyph_t; 141181988197Sjmcneill 1412f766d2f6SmrgPIXMAN_API 141381988197Sjmcneillpixman_glyph_cache_t *pixman_glyph_cache_create (void); 1414f766d2f6Smrg 1415f766d2f6SmrgPIXMAN_API 141681988197Sjmcneillvoid pixman_glyph_cache_destroy (pixman_glyph_cache_t *cache); 1417f766d2f6Smrg 1418f766d2f6SmrgPIXMAN_API 141981988197Sjmcneillvoid pixman_glyph_cache_freeze (pixman_glyph_cache_t *cache); 1420f766d2f6Smrg 1421f766d2f6SmrgPIXMAN_API 142281988197Sjmcneillvoid pixman_glyph_cache_thaw (pixman_glyph_cache_t *cache); 1423f766d2f6Smrg 1424f766d2f6SmrgPIXMAN_API 142581988197Sjmcneillconst void * pixman_glyph_cache_lookup (pixman_glyph_cache_t *cache, 142681988197Sjmcneill void *font_key, 142781988197Sjmcneill void *glyph_key); 1428f766d2f6Smrg 1429f766d2f6SmrgPIXMAN_API 143081988197Sjmcneillconst void * pixman_glyph_cache_insert (pixman_glyph_cache_t *cache, 143181988197Sjmcneill void *font_key, 143281988197Sjmcneill void *glyph_key, 143381988197Sjmcneill int origin_x, 143481988197Sjmcneill int origin_y, 143581988197Sjmcneill pixman_image_t *glyph_image); 1436f766d2f6Smrg 1437f766d2f6SmrgPIXMAN_API 143881988197Sjmcneillvoid pixman_glyph_cache_remove (pixman_glyph_cache_t *cache, 143981988197Sjmcneill void *font_key, 144081988197Sjmcneill void *glyph_key); 1441f766d2f6Smrg 1442f766d2f6SmrgPIXMAN_API 144381988197Sjmcneillvoid pixman_glyph_get_extents (pixman_glyph_cache_t *cache, 144481988197Sjmcneill int n_glyphs, 144581988197Sjmcneill pixman_glyph_t *glyphs, 144681988197Sjmcneill pixman_box32_t *extents); 1447f766d2f6Smrg 1448f766d2f6SmrgPIXMAN_API 144981988197Sjmcneillpixman_format_code_t pixman_glyph_get_mask_format (pixman_glyph_cache_t *cache, 145081988197Sjmcneill int n_glyphs, 145181988197Sjmcneill const pixman_glyph_t *glyphs); 1452f766d2f6Smrg 1453f766d2f6SmrgPIXMAN_API 145481988197Sjmcneillvoid pixman_composite_glyphs (pixman_op_t op, 145581988197Sjmcneill pixman_image_t *src, 145681988197Sjmcneill pixman_image_t *dest, 145781988197Sjmcneill pixman_format_code_t mask_format, 145881988197Sjmcneill int32_t src_x, 145981988197Sjmcneill int32_t src_y, 146081988197Sjmcneill int32_t mask_x, 146181988197Sjmcneill int32_t mask_y, 146281988197Sjmcneill int32_t dest_x, 146381988197Sjmcneill int32_t dest_y, 146481988197Sjmcneill int32_t width, 146581988197Sjmcneill int32_t height, 146681988197Sjmcneill pixman_glyph_cache_t *cache, 146781988197Sjmcneill int n_glyphs, 146881988197Sjmcneill const pixman_glyph_t *glyphs); 1469f766d2f6Smrg 1470f766d2f6SmrgPIXMAN_API 147181988197Sjmcneillvoid pixman_composite_glyphs_no_mask (pixman_op_t op, 147281988197Sjmcneill pixman_image_t *src, 147381988197Sjmcneill pixman_image_t *dest, 147481988197Sjmcneill int32_t src_x, 147581988197Sjmcneill int32_t src_y, 147681988197Sjmcneill int32_t dest_x, 147781988197Sjmcneill int32_t dest_y, 147881988197Sjmcneill pixman_glyph_cache_t *cache, 147981988197Sjmcneill int n_glyphs, 148081988197Sjmcneill const pixman_glyph_t *glyphs); 148181988197Sjmcneill 1482b4b94579Smrg/* 1483b4b94579Smrg * Trapezoids 1484b4b94579Smrg */ 1485b4b94579Smrgtypedef struct pixman_edge pixman_edge_t; 1486b4b94579Smrgtypedef struct pixman_trapezoid pixman_trapezoid_t; 1487b4b94579Smrgtypedef struct pixman_trap pixman_trap_t; 1488b4b94579Smrgtypedef struct pixman_span_fix pixman_span_fix_t; 14896ba797d6Smrgtypedef struct pixman_triangle pixman_triangle_t; 1490b4b94579Smrg 1491b4b94579Smrg/* 1492b4b94579Smrg * An edge structure. This represents a single polygon edge 1493b4b94579Smrg * and can be quickly stepped across small or large gaps in the 1494b4b94579Smrg * sample grid 1495b4b94579Smrg */ 1496b4b94579Smrgstruct pixman_edge 1497b4b94579Smrg{ 1498b4b94579Smrg pixman_fixed_t x; 1499b4b94579Smrg pixman_fixed_t e; 1500d0321353Smrg pixman_fixed_t stepx; 1501d0321353Smrg pixman_fixed_t signdx; 1502d0321353Smrg pixman_fixed_t dy; 1503d0321353Smrg pixman_fixed_t dx; 1504d0321353Smrg 1505d0321353Smrg pixman_fixed_t stepx_small; 1506d0321353Smrg pixman_fixed_t stepx_big; 1507d0321353Smrg pixman_fixed_t dx_small; 1508d0321353Smrg pixman_fixed_t dx_big; 1509b4b94579Smrg}; 1510b4b94579Smrg 1511b4b94579Smrgstruct pixman_trapezoid 1512b4b94579Smrg{ 1513d0321353Smrg pixman_fixed_t top, bottom; 1514b4b94579Smrg pixman_line_fixed_t left, right; 1515b4b94579Smrg}; 1516b4b94579Smrg 15176ba797d6Smrgstruct pixman_triangle 15186ba797d6Smrg{ 15196ba797d6Smrg pixman_point_fixed_t p1, p2, p3; 15206ba797d6Smrg}; 1521b4b94579Smrg 1522b4b94579Smrg/* whether 't' is a well defined not obviously empty trapezoid */ 1523d0321353Smrg#define pixman_trapezoid_valid(t) \ 1524b4b94579Smrg ((t)->left.p1.y != (t)->left.p2.y && \ 1525b4b94579Smrg (t)->right.p1.y != (t)->right.p2.y && \ 1526f83768c3Smrg ((t)->bottom > (t)->top)) 1527b4b94579Smrg 1528b4b94579Smrgstruct pixman_span_fix 1529b4b94579Smrg{ 1530b4b94579Smrg pixman_fixed_t l, r, y; 1531b4b94579Smrg}; 1532b4b94579Smrg 1533b4b94579Smrgstruct pixman_trap 1534b4b94579Smrg{ 1535b4b94579Smrg pixman_span_fix_t top, bot; 1536b4b94579Smrg}; 1537b4b94579Smrg 1538f766d2f6SmrgPIXMAN_API 1539b4b94579Smrgpixman_fixed_t pixman_sample_ceil_y (pixman_fixed_t y, 1540b4b94579Smrg int bpp); 1541f766d2f6Smrg 1542f766d2f6SmrgPIXMAN_API 1543b4b94579Smrgpixman_fixed_t pixman_sample_floor_y (pixman_fixed_t y, 1544b4b94579Smrg int bpp); 1545f766d2f6Smrg 1546f766d2f6SmrgPIXMAN_API 1547b4b94579Smrgvoid pixman_edge_step (pixman_edge_t *e, 1548b4b94579Smrg int n); 1549f766d2f6Smrg 1550f766d2f6SmrgPIXMAN_API 1551b4b94579Smrgvoid pixman_edge_init (pixman_edge_t *e, 1552b4b94579Smrg int bpp, 1553b4b94579Smrg pixman_fixed_t y_start, 1554b4b94579Smrg pixman_fixed_t x_top, 1555b4b94579Smrg pixman_fixed_t y_top, 1556b4b94579Smrg pixman_fixed_t x_bot, 1557b4b94579Smrg pixman_fixed_t y_bot); 1558f766d2f6Smrg 1559f766d2f6SmrgPIXMAN_API 1560b4b94579Smrgvoid pixman_line_fixed_edge_init (pixman_edge_t *e, 1561b4b94579Smrg int bpp, 1562b4b94579Smrg pixman_fixed_t y, 1563b4b94579Smrg const pixman_line_fixed_t *line, 1564b4b94579Smrg int x_off, 1565b4b94579Smrg int y_off); 1566f766d2f6Smrg 1567f766d2f6SmrgPIXMAN_API 1568b4b94579Smrgvoid pixman_rasterize_edges (pixman_image_t *image, 1569b4b94579Smrg pixman_edge_t *l, 1570b4b94579Smrg pixman_edge_t *r, 1571b4b94579Smrg pixman_fixed_t t, 1572b4b94579Smrg pixman_fixed_t b); 1573f766d2f6Smrg 1574f766d2f6SmrgPIXMAN_API 1575b4b94579Smrgvoid pixman_add_traps (pixman_image_t *image, 1576b4b94579Smrg int16_t x_off, 1577b4b94579Smrg int16_t y_off, 1578b4b94579Smrg int ntrap, 157981988197Sjmcneill const pixman_trap_t *traps); 1580f766d2f6Smrg 1581f766d2f6SmrgPIXMAN_API 1582b4b94579Smrgvoid pixman_add_trapezoids (pixman_image_t *image, 1583b4b94579Smrg int16_t x_off, 1584b4b94579Smrg int y_off, 1585b4b94579Smrg int ntraps, 1586b4b94579Smrg const pixman_trapezoid_t *traps); 1587f766d2f6Smrg 1588f766d2f6SmrgPIXMAN_API 1589b4b94579Smrgvoid pixman_rasterize_trapezoid (pixman_image_t *image, 1590b4b94579Smrg const pixman_trapezoid_t *trap, 1591b4b94579Smrg int x_off, 1592b4b94579Smrg int y_off); 1593f766d2f6Smrg 1594f766d2f6SmrgPIXMAN_API 15956ba797d6Smrgvoid pixman_composite_trapezoids (pixman_op_t op, 15966ba797d6Smrg pixman_image_t * src, 15976ba797d6Smrg pixman_image_t * dst, 15986ba797d6Smrg pixman_format_code_t mask_format, 15996ba797d6Smrg int x_src, 16006ba797d6Smrg int y_src, 16016ba797d6Smrg int x_dst, 16026ba797d6Smrg int y_dst, 16036ba797d6Smrg int n_traps, 16046ba797d6Smrg const pixman_trapezoid_t * traps); 1605f766d2f6Smrg 1606f766d2f6SmrgPIXMAN_API 16076ba797d6Smrgvoid pixman_composite_triangles (pixman_op_t op, 16086ba797d6Smrg pixman_image_t * src, 16096ba797d6Smrg pixman_image_t * dst, 16106ba797d6Smrg pixman_format_code_t mask_format, 16116ba797d6Smrg int x_src, 16126ba797d6Smrg int y_src, 16136ba797d6Smrg int x_dst, 16146ba797d6Smrg int y_dst, 16156ba797d6Smrg int n_tris, 16166ba797d6Smrg const pixman_triangle_t * tris); 1617f766d2f6Smrg 1618f766d2f6SmrgPIXMAN_API 16196ba797d6Smrgvoid pixman_add_triangles (pixman_image_t *image, 16206ba797d6Smrg int32_t x_off, 16216ba797d6Smrg int32_t y_off, 16226ba797d6Smrg int n_tris, 16236ba797d6Smrg const pixman_triangle_t *tris); 1624b4b94579Smrg 1625952204abSmrgPIXMAN_END_DECLS 1626952204abSmrg 1627b4b94579Smrg#endif /* PIXMAN_H__ */ 1628