/***********************************************************
Copyright 1987, 1998 The Open Group
Permission to use, copy, modify, distribute, and sell this software and its
documentation for any purpose is hereby granted without fee, provided that
the above copyright notice appear in all copies and that both that
copyright notice and this permission notice appear in supporting
documentation.
The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
Except as contained in this notice, the name of The Open Group shall not be
used in advertising or otherwise to promote the sale, use or other dealings
in this Software without prior written authorization from The Open Group.
Copyright 1987 by Digital Equipment Corporation, Maynard, Massachusetts.
All Rights Reserved
Permission to use, copy, modify, and distribute this software and its
documentation for any purpose and without fee is hereby granted,
provided that the above copyright notice appear in all copies and that
both that copyright notice and this permission notice appear in
supporting documentation, and that the name of Digital not be
used in advertising or publicity pertaining to distribution of the
software without specific, written prior permission.
DIGITAL DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING
ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL
DIGITAL BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR
ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION,
ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
SOFTWARE.
******************************************************************/
/*
* Copyright © 1998, 2004 Keith Packard
* Copyright 2007 Red Hat, Inc.
*
* Permission to use, copy, modify, distribute, and sell this software and its
* documentation for any purpose is hereby granted without fee, provided that
* the above copyright notice appear in all copies and that both that
* copyright notice and this permission notice appear in supporting
* documentation, and that the name of Keith Packard not be used in
* advertising or publicity pertaining to distribution of the software without
* specific, written prior permission. Keith Packard makes no
* representations about the suitability of this software for any purpose. It
* is provided "as is" without express or implied warranty.
*
* KEITH PACKARD DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE,
* INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO
* EVENT SHALL KEITH PACKARD BE LIABLE FOR ANY SPECIAL, INDIRECT OR
* CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE,
* DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
* TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
* PERFORMANCE OF THIS SOFTWARE.
*/
#ifndef PIXMAN_H__
#define PIXMAN_H__
#include <pixman-version.h>
/*
* Standard integers
*/
#if defined (_SVR4) || defined (SVR4) || defined (__OpenBSD__) || defined (_sgi) || defined (__sun) || defined (sun) || defined (__digital__)
# include <inttypes.h>
# include <sys/inttypes.h>
#else
# include <stdint.h>
#endif
/*
* Boolean
*/
typedef int pixman_bool_t;
/*
* Fixpoint numbers
*/
/*
* Misc structs
*/
struct pixman_color
{
};
struct pixman_point_fixed
{
};
struct pixman_line_fixed
{
};
/*
* Fixed point matrices
*/
struct pixman_vector
{
};
struct pixman_transform
{
};
/* forward declaration (sorry) */
struct pixman_box16;
struct pixman_vector *vector);
struct pixman_vector *vector);
const struct pixman_transform *l,
const struct pixman_transform *r);
void pixman_transform_init_scale (struct pixman_transform *t,
struct pixman_transform *reverse,
void pixman_transform_init_rotate (struct pixman_transform *t,
struct pixman_transform *reverse,
pixman_fixed_t s);
void pixman_transform_init_translate (struct pixman_transform *t,
struct pixman_transform *reverse,
struct pixman_box16 *b);
const struct pixman_transform *src);
const struct pixman_transform *b);
/*
* Floating point matrices
*/
struct pixman_f_vector
{
double v[3];
};
struct pixman_f_transform
{
double m[3][3];
};
const struct pixman_f_transform *ft);
const struct pixman_transform *t);
const struct pixman_f_transform *ft);
const struct pixman_f_transform *src);
struct pixman_f_vector *v);
void pixman_f_transform_point_3d (const struct pixman_f_transform *t,
struct pixman_f_vector *v);
const struct pixman_f_transform *l,
const struct pixman_f_transform *r);
void pixman_f_transform_init_scale (struct pixman_f_transform *t,
double sx,
double sy);
struct pixman_f_transform *reverse,
double sx,
double sy);
void pixman_f_transform_init_rotate (struct pixman_f_transform *t,
double cos,
double sin);
struct pixman_f_transform *reverse,
double c,
double s);
void pixman_f_transform_init_translate (struct pixman_f_transform *t,
double tx,
double ty);
struct pixman_f_transform *reverse,
double tx,
double ty);
struct pixman_box16 *b);
void pixman_f_transform_init_identity (struct pixman_f_transform *t);
typedef enum
{
typedef enum
{
typedef enum
{
} pixman_op_t;
/*
* Regions
*/
struct pixman_region16_data {
long size;
long numRects;
/* pixman_box16_t rects[size]; in memory but not explicitly declared */
};
struct pixman_rectangle16
{
int16_t x, y;
};
struct pixman_box16
{
};
struct pixman_region16
{
};
typedef enum
{
/* This function exists only to make it possible to preserve
* the X ABI - it should go away at first opportunity.
*/
/* creation/destruction */
int x,
int y,
unsigned int width,
unsigned int height);
int count);
/* manipulation */
int x,
int y);
int x,
int y,
unsigned int width,
unsigned int height);
int x,
int y,
int *n_rects);
/*
* 32 bit regions
*/
struct pixman_region32_data {
long size;
long numRects;
/* pixman_box32_t rects[size]; in memory but not explicitly declared */
};
struct pixman_rectangle32
{
int32_t x, y;
};
struct pixman_box32
{
};
struct pixman_region32
{
};
/* creation/destruction */
int x,
int y,
unsigned int width,
unsigned int height);
int count);
/* manipulation */
int x,
int y);
int x,
int y,
unsigned int width,
unsigned int height);
int x,
int y,
int *n_rects);
/* Copy / Fill / Misc */
int src_stride,
int dst_stride,
int src_bpp,
int dst_bpp,
int src_x,
int src_y,
int dst_x,
int dst_y,
int width,
int height);
int stride,
int bpp,
int x,
int y,
int width,
int height,
int pixman_version (void);
const char* pixman_version_string (void);
/*
* Images
*/
struct pixman_gradient_stop {
};
#if PIXMAN_MAX_INDEXED <= 256
#endif
struct pixman_indexed
{
};
/*
* While the protocol is generous in format support, the
* sample implementation allows only packed RGB and GBR
* representations for data to simplify software rendering,
*/
((type) << 16) | \
((a) << 12) | \
((r) << 8) | \
((g) << 4) | \
((b)))
PIXMAN_FORMAT_R(f) + \
PIXMAN_FORMAT_G(f) + \
PIXMAN_FORMAT_B(f))
#define PIXMAN_TYPE_OTHER 0
#define PIXMAN_FORMAT_COLOR(f) \
(PIXMAN_FORMAT_TYPE(f) == PIXMAN_TYPE_ARGB || \
PIXMAN_FORMAT_TYPE(f) == PIXMAN_TYPE_ABGR || \
/* 32bpp formats */
typedef enum {
/* 24bpp formats */
/* 16bpp formats */
/* 8bpp formats */
/* 4bpp formats */
/* 1bpp formats */
/* YUV formats */
/* Querying supported format values. */
/* Constructors */
const pixman_gradient_stop_t *stops,
int n_stops);
const pixman_gradient_stop_t *stops,
int n_stops);
const pixman_gradient_stop_t *stops,
int n_stops);
int width,
int height,
int rowstride_bytes);
/* Destructor */
void *data);
/* Set properties */
const pixman_transform_t *transform);
const pixman_fixed_t *filter_params,
int n_filter_params);
int16_t x,
int16_t y);
const pixman_indexed_t *indexed);
int n_rects,
const pixman_rectangle16_t *rects);
/* Composite */
/* Old X servers rely on out-of-bounds accesses when they are asked
* to composite with a window as the source. They create a pixman image
* pointing to some bogus position in memory, but then they set a clip
* region to the position where the actual bits are.
*
* Due to a bug in old versions of pixman, where it would not clip
* against the image bounds when a clip region was set, this would
* actually work. So by default we allow certain out-of-bound access
* to happen unless explicitly disabled.
*
* Fixed X servers should call this function to disable the workaround.
*/
void pixman_disable_out_of_bounds_workaround (void);
/*
* Trapezoids
*/
/*
* An edge structure. This represents a single polygon edge
* and can be quickly stepped across small or large gaps in the
* sample grid
*/
struct pixman_edge
{
};
struct pixman_trapezoid
{
};
/* whether 't' is a well defined not obviously empty trapezoid */
#define pixman_trapezoid_valid(t) \
struct pixman_span_fix
{
pixman_fixed_t l, r, y;
};
struct pixman_trap
{
};
int bpp);
int bpp);
void pixman_edge_step (pixman_edge_t *e,
int n);
void pixman_edge_init (pixman_edge_t *e,
int bpp,
void pixman_line_fixed_edge_init (pixman_edge_t *e,
int bpp,
const pixman_line_fixed_t *line,
int x_off,
int y_off);
pixman_edge_t *l,
pixman_edge_t *r,
pixman_fixed_t b);
int ntrap,
int y_off,
int ntraps,
const pixman_trapezoid_t *traps);
const pixman_trapezoid_t *trap,
int x_off,
int y_off);
#endif /* PIXMAN_H__ */