picturestr.h revision 4642e01f
105b261ecSmrg/*
205b261ecSmrg * Copyright © 2000 SuSE, Inc.
305b261ecSmrg *
405b261ecSmrg * Permission to use, copy, modify, distribute, and sell this software and its
505b261ecSmrg * documentation for any purpose is hereby granted without fee, provided that
605b261ecSmrg * the above copyright notice appear in all copies and that both that
705b261ecSmrg * copyright notice and this permission notice appear in supporting
805b261ecSmrg * documentation, and that the name of SuSE not be used in advertising or
905b261ecSmrg * publicity pertaining to distribution of the software without specific,
1005b261ecSmrg * written prior permission.  SuSE makes no representations about the
1105b261ecSmrg * suitability of this software for any purpose.  It is provided "as is"
1205b261ecSmrg * without express or implied warranty.
1305b261ecSmrg *
1405b261ecSmrg * SuSE DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING ALL
1505b261ecSmrg * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL SuSE
1605b261ecSmrg * BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
1705b261ecSmrg * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION
1805b261ecSmrg * OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN
1905b261ecSmrg * CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
2005b261ecSmrg *
2105b261ecSmrg * Author:  Keith Packard, SuSE, Inc.
2205b261ecSmrg */
2305b261ecSmrg
2405b261ecSmrg#ifndef _PICTURESTR_H_
2505b261ecSmrg#define _PICTURESTR_H_
2605b261ecSmrg
2705b261ecSmrg#include "scrnintstr.h"
2805b261ecSmrg#include "glyphstr.h"
2905b261ecSmrg#include "resource.h"
304642e01fSmrg#include "privates.h"
3105b261ecSmrg
3205b261ecSmrgtypedef struct _DirectFormat {
3305b261ecSmrg    CARD16	    red, redMask;
3405b261ecSmrg    CARD16	    green, greenMask;
3505b261ecSmrg    CARD16	    blue, blueMask;
3605b261ecSmrg    CARD16	    alpha, alphaMask;
3705b261ecSmrg} DirectFormatRec;
3805b261ecSmrg
3905b261ecSmrgtypedef struct _IndexFormat {
4005b261ecSmrg    VisualID	    vid;
4105b261ecSmrg    ColormapPtr	    pColormap;
4205b261ecSmrg    int		    nvalues;
4305b261ecSmrg    xIndexValue	    *pValues;
4405b261ecSmrg    void	    *devPrivate;
4505b261ecSmrg} IndexFormatRec;
4605b261ecSmrg
4705b261ecSmrgtypedef struct _PictFormat {
4805b261ecSmrg    CARD32	    id;
4905b261ecSmrg    CARD32	    format;	    /* except bpp */
5005b261ecSmrg    unsigned char   type;
5105b261ecSmrg    unsigned char   depth;
5205b261ecSmrg    DirectFormatRec direct;
5305b261ecSmrg    IndexFormatRec  index;
5405b261ecSmrg} PictFormatRec;
5505b261ecSmrg
5605b261ecSmrgtypedef struct pixman_vector PictVector, *PictVectorPtr;
5705b261ecSmrgtypedef struct pixman_transform PictTransform, *PictTransformPtr;
5805b261ecSmrg
594642e01fSmrg#define pict_f_vector pixman_f_vector
604642e01fSmrg#define pict_f_transform pixman_f_transform
614642e01fSmrg
6205b261ecSmrg#define PICT_GRADIENT_STOPTABLE_SIZE 1024
6305b261ecSmrg#define SourcePictTypeSolidFill 0
6405b261ecSmrg#define SourcePictTypeLinear 1
6505b261ecSmrg#define SourcePictTypeRadial 2
6605b261ecSmrg#define SourcePictTypeConical 3
6705b261ecSmrg
6805b261ecSmrg#define SourcePictClassUnknown    0
6905b261ecSmrg#define SourcePictClassHorizontal 1
7005b261ecSmrg#define SourcePictClassVertical   2
7105b261ecSmrg
7205b261ecSmrgtypedef struct _PictSolidFill {
7305b261ecSmrg    unsigned int type;
7405b261ecSmrg    unsigned int class;
7505b261ecSmrg    CARD32 color;
7605b261ecSmrg} PictSolidFill, *PictSolidFillPtr;
7705b261ecSmrg
7805b261ecSmrgtypedef struct _PictGradientStop {
7905b261ecSmrg    xFixed x;
8005b261ecSmrg    xRenderColor color;
8105b261ecSmrg} PictGradientStop, *PictGradientStopPtr;
8205b261ecSmrg
8305b261ecSmrgtypedef struct _PictGradient {
8405b261ecSmrg    unsigned int type;
8505b261ecSmrg    unsigned int class;
8605b261ecSmrg    int nstops;
8705b261ecSmrg    PictGradientStopPtr stops;
8805b261ecSmrg    int stopRange;
8905b261ecSmrg    CARD32 *colorTable;
9005b261ecSmrg    int colorTableSize;
9105b261ecSmrg} PictGradient, *PictGradientPtr;
9205b261ecSmrg
9305b261ecSmrgtypedef struct _PictLinearGradient {
9405b261ecSmrg    unsigned int type;
9505b261ecSmrg    unsigned int class;
9605b261ecSmrg    int nstops;
9705b261ecSmrg    PictGradientStopPtr stops;
9805b261ecSmrg    int stopRange;
9905b261ecSmrg    CARD32 *colorTable;
10005b261ecSmrg    int colorTableSize;
10105b261ecSmrg    xPointFixed p1;
10205b261ecSmrg    xPointFixed p2;
10305b261ecSmrg} PictLinearGradient, *PictLinearGradientPtr;
10405b261ecSmrg
10505b261ecSmrgtypedef struct _PictCircle {
10605b261ecSmrg    xFixed x;
10705b261ecSmrg    xFixed y;
10805b261ecSmrg    xFixed radius;
10905b261ecSmrg} PictCircle, *PictCirclePtr;
11005b261ecSmrg
11105b261ecSmrgtypedef struct _PictRadialGradient {
11205b261ecSmrg    unsigned int type;
11305b261ecSmrg    unsigned int class;
11405b261ecSmrg    int nstops;
11505b261ecSmrg    PictGradientStopPtr stops;
11605b261ecSmrg    int stopRange;
11705b261ecSmrg    CARD32 *colorTable;
11805b261ecSmrg    int colorTableSize;
11905b261ecSmrg    PictCircle c1;
12005b261ecSmrg    PictCircle c2;
12105b261ecSmrg    double cdx;
12205b261ecSmrg    double cdy;
12305b261ecSmrg    double dr;
12405b261ecSmrg    double A;
12505b261ecSmrg} PictRadialGradient, *PictRadialGradientPtr;
12605b261ecSmrg
12705b261ecSmrgtypedef struct _PictConicalGradient {
12805b261ecSmrg    unsigned int type;
12905b261ecSmrg    unsigned int class;
13005b261ecSmrg    int nstops;
13105b261ecSmrg    PictGradientStopPtr stops;
13205b261ecSmrg    int stopRange;
13305b261ecSmrg    CARD32 *colorTable;
13405b261ecSmrg    int colorTableSize;
13505b261ecSmrg    xPointFixed center;
13605b261ecSmrg    xFixed angle;
13705b261ecSmrg} PictConicalGradient, *PictConicalGradientPtr;
13805b261ecSmrg
13905b261ecSmrgtypedef union _SourcePict {
14005b261ecSmrg    unsigned int type;
14105b261ecSmrg    PictSolidFill solidFill;
14205b261ecSmrg    PictGradient gradient;
14305b261ecSmrg    PictLinearGradient linear;
14405b261ecSmrg    PictRadialGradient radial;
14505b261ecSmrg    PictConicalGradient conical;
14605b261ecSmrg} SourcePict, *SourcePictPtr;
14705b261ecSmrg
14805b261ecSmrgtypedef struct _Picture {
14905b261ecSmrg    DrawablePtr	    pDrawable;
15005b261ecSmrg    PictFormatPtr   pFormat;
15105b261ecSmrg    PictFormatShort format;	    /* PICT_FORMAT */
15205b261ecSmrg    int		    refcnt;
15305b261ecSmrg    CARD32	    id;
15405b261ecSmrg    PicturePtr	    pNext;	    /* chain on same drawable */
15505b261ecSmrg
15605b261ecSmrg    unsigned int    repeat : 1;
15705b261ecSmrg    unsigned int    graphicsExposures : 1;
15805b261ecSmrg    unsigned int    subWindowMode : 1;
15905b261ecSmrg    unsigned int    polyEdge : 1;
16005b261ecSmrg    unsigned int    polyMode : 1;
16105b261ecSmrg    unsigned int    freeCompClip : 1;
16205b261ecSmrg    unsigned int    clientClipType : 2;
16305b261ecSmrg    unsigned int    componentAlpha : 1;
16405b261ecSmrg    unsigned int    repeatType : 2;
16505b261ecSmrg    unsigned int    unused : 21;
16605b261ecSmrg
16705b261ecSmrg    PicturePtr	    alphaMap;
16805b261ecSmrg    DDXPointRec	    alphaOrigin;
16905b261ecSmrg
17005b261ecSmrg    DDXPointRec	    clipOrigin;
17105b261ecSmrg    pointer	    clientClip;
17205b261ecSmrg
17305b261ecSmrg    Atom	    dither;
17405b261ecSmrg
17505b261ecSmrg    unsigned long   stateChanges;
17605b261ecSmrg    unsigned long   serialNumber;
17705b261ecSmrg
17805b261ecSmrg    RegionPtr	    pCompositeClip;
17905b261ecSmrg
1804642e01fSmrg    PrivateRec	    *devPrivates;
18105b261ecSmrg
18205b261ecSmrg    PictTransform   *transform;
18305b261ecSmrg
18405b261ecSmrg    int		    filter;
18505b261ecSmrg    xFixed	    *filter_params;
18605b261ecSmrg    int		    filter_nparams;
18705b261ecSmrg    SourcePictPtr   pSourcePict;
18805b261ecSmrg} PictureRec;
18905b261ecSmrg
1904642e01fSmrgtypedef Bool (*PictFilterValidateParamsProcPtr) (ScreenPtr pScreen, int id,
1914642e01fSmrg						 xFixed *params, int nparams,
1924642e01fSmrg						 int *width, int *height);
19305b261ecSmrgtypedef struct {
19405b261ecSmrg    char			    *name;
19505b261ecSmrg    int				    id;
19605b261ecSmrg    PictFilterValidateParamsProcPtr ValidateParams;
1974642e01fSmrg    int				    width, height;
19805b261ecSmrg} PictFilterRec, *PictFilterPtr;
19905b261ecSmrg
20005b261ecSmrg#define PictFilterNearest	0
20105b261ecSmrg#define PictFilterBilinear	1
20205b261ecSmrg
20305b261ecSmrg#define PictFilterFast		2
20405b261ecSmrg#define PictFilterGood		3
20505b261ecSmrg#define PictFilterBest		4
20605b261ecSmrg
20705b261ecSmrg#define PictFilterConvolution	5
20805b261ecSmrg
20905b261ecSmrgtypedef struct {
21005b261ecSmrg    char	    *alias;
21105b261ecSmrg    int		    alias_id;
21205b261ecSmrg    int		    filter_id;
21305b261ecSmrg} PictFilterAliasRec, *PictFilterAliasPtr;
21405b261ecSmrg
21505b261ecSmrgtypedef int	(*CreatePictureProcPtr)	    (PicturePtr pPicture);
21605b261ecSmrgtypedef void	(*DestroyPictureProcPtr)    (PicturePtr pPicture);
21705b261ecSmrgtypedef int	(*ChangePictureClipProcPtr) (PicturePtr	pPicture,
21805b261ecSmrg					     int	clipType,
21905b261ecSmrg					     pointer    value,
22005b261ecSmrg					     int	n);
22105b261ecSmrgtypedef void	(*DestroyPictureClipProcPtr)(PicturePtr	pPicture);
22205b261ecSmrg
22305b261ecSmrgtypedef int	(*ChangePictureTransformProcPtr)    (PicturePtr	    pPicture,
22405b261ecSmrg						     PictTransform  *transform);
22505b261ecSmrg
22605b261ecSmrgtypedef int	(*ChangePictureFilterProcPtr)	(PicturePtr	pPicture,
22705b261ecSmrg						 int		filter,
22805b261ecSmrg						 xFixed		*params,
22905b261ecSmrg						 int		nparams);
23005b261ecSmrg
23105b261ecSmrgtypedef void	(*DestroyPictureFilterProcPtr)	(PicturePtr pPicture);
23205b261ecSmrg
23305b261ecSmrgtypedef void	(*ChangePictureProcPtr)	    (PicturePtr pPicture,
23405b261ecSmrg					     Mask	mask);
23505b261ecSmrgtypedef void	(*ValidatePictureProcPtr)    (PicturePtr pPicture,
23605b261ecSmrg					     Mask       mask);
23705b261ecSmrgtypedef void	(*CompositeProcPtr)	    (CARD8	op,
23805b261ecSmrg					     PicturePtr pSrc,
23905b261ecSmrg					     PicturePtr pMask,
24005b261ecSmrg					     PicturePtr pDst,
24105b261ecSmrg					     INT16	xSrc,
24205b261ecSmrg					     INT16	ySrc,
24305b261ecSmrg					     INT16	xMask,
24405b261ecSmrg					     INT16	yMask,
24505b261ecSmrg					     INT16	xDst,
24605b261ecSmrg					     INT16	yDst,
24705b261ecSmrg					     CARD16	width,
24805b261ecSmrg					     CARD16	height);
24905b261ecSmrg
25005b261ecSmrgtypedef void	(*GlyphsProcPtr)	    (CARD8      op,
25105b261ecSmrg					     PicturePtr pSrc,
25205b261ecSmrg					     PicturePtr pDst,
25305b261ecSmrg					     PictFormatPtr  maskFormat,
25405b261ecSmrg					     INT16      xSrc,
25505b261ecSmrg					     INT16      ySrc,
25605b261ecSmrg					     int	nlists,
25705b261ecSmrg					     GlyphListPtr   lists,
25805b261ecSmrg					     GlyphPtr	*glyphs);
25905b261ecSmrg
26005b261ecSmrgtypedef void	(*CompositeRectsProcPtr)    (CARD8	    op,
26105b261ecSmrg					     PicturePtr	    pDst,
26205b261ecSmrg					     xRenderColor   *color,
26305b261ecSmrg					     int	    nRect,
26405b261ecSmrg					     xRectangle	    *rects);
26505b261ecSmrg
26605b261ecSmrgtypedef void	(*RasterizeTrapezoidProcPtr)(PicturePtr	    pMask,
26705b261ecSmrg					     xTrapezoid	    *trap,
26805b261ecSmrg					     int	    x_off,
26905b261ecSmrg					     int	    y_off);
27005b261ecSmrg
27105b261ecSmrgtypedef void	(*TrapezoidsProcPtr)	    (CARD8	    op,
27205b261ecSmrg					     PicturePtr	    pSrc,
27305b261ecSmrg					     PicturePtr	    pDst,
27405b261ecSmrg					     PictFormatPtr  maskFormat,
27505b261ecSmrg					     INT16	    xSrc,
27605b261ecSmrg					     INT16	    ySrc,
27705b261ecSmrg					     int	    ntrap,
27805b261ecSmrg					     xTrapezoid	    *traps);
27905b261ecSmrg
28005b261ecSmrgtypedef void	(*TrianglesProcPtr)	    (CARD8	    op,
28105b261ecSmrg					     PicturePtr	    pSrc,
28205b261ecSmrg					     PicturePtr	    pDst,
28305b261ecSmrg					     PictFormatPtr  maskFormat,
28405b261ecSmrg					     INT16	    xSrc,
28505b261ecSmrg					     INT16	    ySrc,
28605b261ecSmrg					     int	    ntri,
28705b261ecSmrg					     xTriangle	    *tris);
28805b261ecSmrg
28905b261ecSmrgtypedef void	(*TriStripProcPtr)	    (CARD8	    op,
29005b261ecSmrg					     PicturePtr	    pSrc,
29105b261ecSmrg					     PicturePtr	    pDst,
29205b261ecSmrg					     PictFormatPtr  maskFormat,
29305b261ecSmrg					     INT16	    xSrc,
29405b261ecSmrg					     INT16	    ySrc,
29505b261ecSmrg					     int	    npoint,
29605b261ecSmrg					     xPointFixed    *points);
29705b261ecSmrg
29805b261ecSmrgtypedef void	(*TriFanProcPtr)	    (CARD8	    op,
29905b261ecSmrg					     PicturePtr	    pSrc,
30005b261ecSmrg					     PicturePtr	    pDst,
30105b261ecSmrg					     PictFormatPtr  maskFormat,
30205b261ecSmrg					     INT16	    xSrc,
30305b261ecSmrg					     INT16	    ySrc,
30405b261ecSmrg					     int	    npoint,
30505b261ecSmrg					     xPointFixed    *points);
30605b261ecSmrg
30705b261ecSmrgtypedef Bool	(*InitIndexedProcPtr)	    (ScreenPtr	    pScreen,
30805b261ecSmrg					     PictFormatPtr  pFormat);
30905b261ecSmrg
31005b261ecSmrgtypedef void	(*CloseIndexedProcPtr)	    (ScreenPtr	    pScreen,
31105b261ecSmrg					     PictFormatPtr  pFormat);
31205b261ecSmrg
31305b261ecSmrgtypedef void	(*UpdateIndexedProcPtr)	    (ScreenPtr	    pScreen,
31405b261ecSmrg					     PictFormatPtr  pFormat,
31505b261ecSmrg					     int	    ndef,
31605b261ecSmrg					     xColorItem	    *pdef);
31705b261ecSmrg
31805b261ecSmrgtypedef void	(*AddTrapsProcPtr)	    (PicturePtr	    pPicture,
31905b261ecSmrg					     INT16	    xOff,
32005b261ecSmrg					     INT16	    yOff,
32105b261ecSmrg					     int	    ntrap,
32205b261ecSmrg					     xTrap	    *traps);
32305b261ecSmrg
32405b261ecSmrgtypedef void	(*AddTrianglesProcPtr)	    (PicturePtr	    pPicture,
32505b261ecSmrg					     INT16	    xOff,
32605b261ecSmrg					     INT16	    yOff,
32705b261ecSmrg					     int	    ntri,
32805b261ecSmrg					     xTriangle	    *tris);
32905b261ecSmrg
33005b261ecSmrgtypedef Bool	(*RealizeGlyphProcPtr)	    (ScreenPtr	    pScreen,
33105b261ecSmrg					     GlyphPtr	    glyph);
33205b261ecSmrg
33305b261ecSmrgtypedef void	(*UnrealizeGlyphProcPtr)    (ScreenPtr	    pScreen,
33405b261ecSmrg					     GlyphPtr	    glyph);
33505b261ecSmrg
33605b261ecSmrgtypedef struct _PictureScreen {
33705b261ecSmrg    PictFormatPtr		formats;
33805b261ecSmrg    PictFormatPtr		fallback;
33905b261ecSmrg    int				nformats;
34005b261ecSmrg
34105b261ecSmrg    CreatePictureProcPtr	CreatePicture;
34205b261ecSmrg    DestroyPictureProcPtr	DestroyPicture;
34305b261ecSmrg    ChangePictureClipProcPtr	ChangePictureClip;
34405b261ecSmrg    DestroyPictureClipProcPtr	DestroyPictureClip;
34505b261ecSmrg
34605b261ecSmrg    ChangePictureProcPtr	ChangePicture;
34705b261ecSmrg    ValidatePictureProcPtr	ValidatePicture;
34805b261ecSmrg
34905b261ecSmrg    CompositeProcPtr		Composite;
3504642e01fSmrg    GlyphsProcPtr		Glyphs; /* unused */
35105b261ecSmrg    CompositeRectsProcPtr	CompositeRects;
35205b261ecSmrg
35305b261ecSmrg    DestroyWindowProcPtr	DestroyWindow;
35405b261ecSmrg    CloseScreenProcPtr		CloseScreen;
35505b261ecSmrg
35605b261ecSmrg    StoreColorsProcPtr		StoreColors;
35705b261ecSmrg
35805b261ecSmrg    InitIndexedProcPtr		InitIndexed;
35905b261ecSmrg    CloseIndexedProcPtr		CloseIndexed;
36005b261ecSmrg    UpdateIndexedProcPtr	UpdateIndexed;
36105b261ecSmrg
36205b261ecSmrg    int				subpixel;
36305b261ecSmrg
36405b261ecSmrg    PictFilterPtr		filters;
36505b261ecSmrg    int				nfilters;
36605b261ecSmrg    PictFilterAliasPtr		filterAliases;
36705b261ecSmrg    int				nfilterAliases;
36805b261ecSmrg
36905b261ecSmrg    /**
37005b261ecSmrg     * Called immediately after a picture's transform is changed through the
37105b261ecSmrg     * SetPictureTransform request.  Not called for source-only pictures.
37205b261ecSmrg     */
37305b261ecSmrg    ChangePictureTransformProcPtr   ChangePictureTransform;
37405b261ecSmrg
37505b261ecSmrg    /**
37605b261ecSmrg     * Called immediately after a picture's transform is changed through the
37705b261ecSmrg     * SetPictureFilter request.  Not called for source-only pictures.
37805b261ecSmrg     */
37905b261ecSmrg    ChangePictureFilterProcPtr	ChangePictureFilter;
38005b261ecSmrg
38105b261ecSmrg    DestroyPictureFilterProcPtr	DestroyPictureFilter;
38205b261ecSmrg
38305b261ecSmrg    TrapezoidsProcPtr		Trapezoids;
38405b261ecSmrg    TrianglesProcPtr		Triangles;
38505b261ecSmrg    TriStripProcPtr		TriStrip;
38605b261ecSmrg    TriFanProcPtr		TriFan;
38705b261ecSmrg
38805b261ecSmrg    RasterizeTrapezoidProcPtr	RasterizeTrapezoid;
38905b261ecSmrg
39005b261ecSmrg    AddTrianglesProcPtr		AddTriangles;
39105b261ecSmrg
39205b261ecSmrg    AddTrapsProcPtr		AddTraps;
39305b261ecSmrg
39405b261ecSmrg    RealizeGlyphProcPtr   	RealizeGlyph;
39505b261ecSmrg    UnrealizeGlyphProcPtr 	UnrealizeGlyph;
39605b261ecSmrg
39705b261ecSmrg} PictureScreenRec, *PictureScreenPtr;
39805b261ecSmrg
3994642e01fSmrgextern DevPrivateKey	PictureScreenPrivateKey;
4004642e01fSmrgextern DevPrivateKey	PictureWindowPrivateKey;
40105b261ecSmrgextern RESTYPE		PictureType;
40205b261ecSmrgextern RESTYPE		PictFormatType;
40305b261ecSmrgextern RESTYPE		GlyphSetType;
40405b261ecSmrg
4054642e01fSmrg#define GetPictureScreen(s) ((PictureScreenPtr)dixLookupPrivate(&(s)->devPrivates, PictureScreenPrivateKey))
4064642e01fSmrg#define GetPictureScreenIfSet(s) GetPictureScreen(s)
4074642e01fSmrg#define SetPictureScreen(s,p) dixSetPrivate(&(s)->devPrivates, PictureScreenPrivateKey, p)
4084642e01fSmrg#define GetPictureWindow(w) ((PicturePtr)dixLookupPrivate(&(w)->devPrivates, PictureWindowPrivateKey))
4094642e01fSmrg#define SetPictureWindow(w,p) dixSetPrivate(&(w)->devPrivates, PictureWindowPrivateKey, p)
41005b261ecSmrg
41105b261ecSmrg#define VERIFY_PICTURE(pPicture, pid, client, mode, err) {\
41205b261ecSmrg    pPicture = SecurityLookupIDByType(client, pid, PictureType, mode);\
41305b261ecSmrg    if (!pPicture) { \
41405b261ecSmrg	client->errorValue = pid; \
41505b261ecSmrg	return err; \
41605b261ecSmrg    } \
41705b261ecSmrg}
41805b261ecSmrg
41905b261ecSmrg#define VERIFY_ALPHA(pPicture, pid, client, mode, err) {\
42005b261ecSmrg    if (pid == None) \
42105b261ecSmrg	pPicture = 0; \
42205b261ecSmrg    else { \
42305b261ecSmrg	VERIFY_PICTURE(pPicture, pid, client, mode, err); \
42405b261ecSmrg    } \
42505b261ecSmrg} \
42605b261ecSmrg
42705b261ecSmrgBool
42805b261ecSmrgPictureDestroyWindow (WindowPtr pWindow);
42905b261ecSmrg
43005b261ecSmrgBool
43105b261ecSmrgPictureCloseScreen (int Index, ScreenPtr pScreen);
43205b261ecSmrg
43305b261ecSmrgvoid
43405b261ecSmrgPictureStoreColors (ColormapPtr pColormap, int ndef, xColorItem *pdef);
43505b261ecSmrg
43605b261ecSmrgBool
4374642e01fSmrgPictureInitIndexedFormat (ScreenPtr pScreen, PictFormatPtr format);
43805b261ecSmrg
43905b261ecSmrgBool
44005b261ecSmrgPictureSetSubpixelOrder (ScreenPtr pScreen, int subpixel);
44105b261ecSmrg
44205b261ecSmrgint
44305b261ecSmrgPictureGetSubpixelOrder (ScreenPtr pScreen);
44405b261ecSmrg
44505b261ecSmrgPictFormatPtr
44605b261ecSmrgPictureCreateDefaultFormats (ScreenPtr pScreen, int *nformatp);
44705b261ecSmrg
44805b261ecSmrgPictFormatPtr
44905b261ecSmrgPictureMatchVisual (ScreenPtr pScreen, int depth, VisualPtr pVisual);
45005b261ecSmrg
45105b261ecSmrgPictFormatPtr
45205b261ecSmrgPictureMatchFormat (ScreenPtr pScreen, int depth, CARD32 format);
45305b261ecSmrg
45405b261ecSmrgBool
45505b261ecSmrgPictureInit (ScreenPtr pScreen, PictFormatPtr formats, int nformats);
45605b261ecSmrg
45705b261ecSmrgint
45805b261ecSmrgPictureGetFilterId (char *filter, int len, Bool makeit);
45905b261ecSmrg
46005b261ecSmrgchar *
46105b261ecSmrgPictureGetFilterName (int id);
46205b261ecSmrg
46305b261ecSmrgint
46405b261ecSmrgPictureAddFilter (ScreenPtr			    pScreen,
46505b261ecSmrg		  char				    *filter,
4664642e01fSmrg		  PictFilterValidateParamsProcPtr   ValidateParams,
4674642e01fSmrg		  int				    width,
4684642e01fSmrg		  int				    height);
46905b261ecSmrg
47005b261ecSmrgBool
47105b261ecSmrgPictureSetFilterAlias (ScreenPtr pScreen, char *filter, char *alias);
47205b261ecSmrg
47305b261ecSmrgBool
47405b261ecSmrgPictureSetDefaultFilters (ScreenPtr pScreen);
47505b261ecSmrg
47605b261ecSmrgvoid
47705b261ecSmrgPictureResetFilters (ScreenPtr pScreen);
47805b261ecSmrg
47905b261ecSmrgPictFilterPtr
48005b261ecSmrgPictureFindFilter (ScreenPtr pScreen, char *name, int len);
48105b261ecSmrg
48205b261ecSmrgint
4834642e01fSmrgSetPicturePictFilter (PicturePtr pPicture, PictFilterPtr pFilter,
4844642e01fSmrg		      xFixed *params, int nparams);
4854642e01fSmrg
4864642e01fSmrgint
4874642e01fSmrgSetPictureFilter (PicturePtr pPicture, char *name, int len,
4884642e01fSmrg		  xFixed *params, int nparams);
48905b261ecSmrg
49005b261ecSmrgBool
49105b261ecSmrgPictureFinishInit (void);
49205b261ecSmrg
49305b261ecSmrgvoid
49405b261ecSmrgSetPictureToDefaults (PicturePtr pPicture);
49505b261ecSmrg
49605b261ecSmrgPicturePtr
49705b261ecSmrgCreatePicture (Picture		pid,
49805b261ecSmrg	       DrawablePtr	pDrawable,
49905b261ecSmrg	       PictFormatPtr	pFormat,
50005b261ecSmrg	       Mask		mask,
50105b261ecSmrg	       XID		*list,
50205b261ecSmrg	       ClientPtr	client,
50305b261ecSmrg	       int		*error);
50405b261ecSmrg
50505b261ecSmrgint
50605b261ecSmrgChangePicture (PicturePtr	pPicture,
50705b261ecSmrg	       Mask		vmask,
50805b261ecSmrg	       XID		*vlist,
50905b261ecSmrg	       DevUnion		*ulist,
51005b261ecSmrg	       ClientPtr	client);
51105b261ecSmrg
51205b261ecSmrgint
51305b261ecSmrgSetPictureClipRects (PicturePtr	pPicture,
51405b261ecSmrg		     int	xOrigin,
51505b261ecSmrg		     int	yOrigin,
51605b261ecSmrg		     int	nRect,
51705b261ecSmrg		     xRectangle	*rects);
51805b261ecSmrg
51905b261ecSmrgint
52005b261ecSmrgSetPictureClipRegion (PicturePtr    pPicture,
52105b261ecSmrg		      int	    xOrigin,
52205b261ecSmrg		      int	    yOrigin,
52305b261ecSmrg		      RegionPtr	    pRegion);
52405b261ecSmrg
52505b261ecSmrgint
52605b261ecSmrgSetPictureTransform (PicturePtr	    pPicture,
52705b261ecSmrg		     PictTransform  *transform);
52805b261ecSmrg
52905b261ecSmrgvoid
53005b261ecSmrgCopyPicture (PicturePtr	pSrc,
53105b261ecSmrg	     Mask	mask,
53205b261ecSmrg	     PicturePtr	pDst);
53305b261ecSmrg
53405b261ecSmrgvoid
53505b261ecSmrgValidatePicture(PicturePtr pPicture);
53605b261ecSmrg
53705b261ecSmrgint
53805b261ecSmrgFreePicture (pointer	pPicture,
53905b261ecSmrg	     XID	pid);
54005b261ecSmrg
54105b261ecSmrgint
54205b261ecSmrgFreePictFormat (pointer	pPictFormat,
54305b261ecSmrg		XID     pid);
54405b261ecSmrg
54505b261ecSmrgvoid
54605b261ecSmrgCompositePicture (CARD8		op,
54705b261ecSmrg		  PicturePtr	pSrc,
54805b261ecSmrg		  PicturePtr	pMask,
54905b261ecSmrg		  PicturePtr	pDst,
55005b261ecSmrg		  INT16		xSrc,
55105b261ecSmrg		  INT16		ySrc,
55205b261ecSmrg		  INT16		xMask,
55305b261ecSmrg		  INT16		yMask,
55405b261ecSmrg		  INT16		xDst,
55505b261ecSmrg		  INT16		yDst,
55605b261ecSmrg		  CARD16	width,
55705b261ecSmrg		  CARD16	height);
55805b261ecSmrg
55905b261ecSmrgvoid
56005b261ecSmrgCompositeGlyphs (CARD8		op,
56105b261ecSmrg		 PicturePtr	pSrc,
56205b261ecSmrg		 PicturePtr	pDst,
56305b261ecSmrg		 PictFormatPtr	maskFormat,
56405b261ecSmrg		 INT16		xSrc,
56505b261ecSmrg		 INT16		ySrc,
56605b261ecSmrg		 int		nlist,
56705b261ecSmrg		 GlyphListPtr	lists,
56805b261ecSmrg		 GlyphPtr	*glyphs);
56905b261ecSmrg
57005b261ecSmrgvoid
57105b261ecSmrgCompositeRects (CARD8		op,
57205b261ecSmrg		PicturePtr	pDst,
57305b261ecSmrg		xRenderColor	*color,
57405b261ecSmrg		int		nRect,
57505b261ecSmrg		xRectangle      *rects);
57605b261ecSmrg
57705b261ecSmrgvoid
57805b261ecSmrgCompositeTrapezoids (CARD8	    op,
57905b261ecSmrg		     PicturePtr	    pSrc,
58005b261ecSmrg		     PicturePtr	    pDst,
58105b261ecSmrg		     PictFormatPtr  maskFormat,
58205b261ecSmrg		     INT16	    xSrc,
58305b261ecSmrg		     INT16	    ySrc,
58405b261ecSmrg		     int	    ntrap,
58505b261ecSmrg		     xTrapezoid	    *traps);
58605b261ecSmrg
58705b261ecSmrgvoid
58805b261ecSmrgCompositeTriangles (CARD8	    op,
58905b261ecSmrg		    PicturePtr	    pSrc,
59005b261ecSmrg		    PicturePtr	    pDst,
59105b261ecSmrg		    PictFormatPtr   maskFormat,
59205b261ecSmrg		    INT16	    xSrc,
59305b261ecSmrg		    INT16	    ySrc,
59405b261ecSmrg		    int		    ntriangles,
59505b261ecSmrg		    xTriangle	    *triangles);
59605b261ecSmrg
59705b261ecSmrgvoid
59805b261ecSmrgCompositeTriStrip (CARD8	    op,
59905b261ecSmrg		   PicturePtr	    pSrc,
60005b261ecSmrg		   PicturePtr	    pDst,
60105b261ecSmrg		   PictFormatPtr    maskFormat,
60205b261ecSmrg		   INT16	    xSrc,
60305b261ecSmrg		   INT16	    ySrc,
60405b261ecSmrg		   int		    npoints,
60505b261ecSmrg		   xPointFixed	    *points);
60605b261ecSmrg
60705b261ecSmrgvoid
60805b261ecSmrgCompositeTriFan (CARD8		op,
60905b261ecSmrg		 PicturePtr	pSrc,
61005b261ecSmrg		 PicturePtr	pDst,
61105b261ecSmrg		 PictFormatPtr	maskFormat,
61205b261ecSmrg		 INT16		xSrc,
61305b261ecSmrg		 INT16		ySrc,
61405b261ecSmrg		 int		npoints,
61505b261ecSmrg		 xPointFixed	*points);
61605b261ecSmrg
61705b261ecSmrgCARD32
61805b261ecSmrgPictureGradientColor (PictGradientStopPtr stop1,
61905b261ecSmrg		      PictGradientStopPtr stop2,
62005b261ecSmrg		      CARD32	          x);
62105b261ecSmrg
62205b261ecSmrgvoid RenderExtensionInit (void);
62305b261ecSmrg
62405b261ecSmrgBool
62505b261ecSmrgAnimCurInit (ScreenPtr pScreen);
62605b261ecSmrg
62705b261ecSmrgint
6284642e01fSmrgAnimCursorCreate (CursorPtr *cursors, CARD32 *deltas, int ncursor, CursorPtr *ppCursor, ClientPtr client, XID cid);
62905b261ecSmrg
63005b261ecSmrgvoid
63105b261ecSmrgAddTraps (PicturePtr	pPicture,
63205b261ecSmrg	  INT16		xOff,
63305b261ecSmrg	  INT16		yOff,
63405b261ecSmrg	  int		ntraps,
63505b261ecSmrg	  xTrap		*traps);
63605b261ecSmrg
63705b261ecSmrgpixman_image_t *
63805b261ecSmrgPixmanImageFromPicture (PicturePtr pPict,
63905b261ecSmrg			Bool hasClip);
64005b261ecSmrg
64105b261ecSmrgPicturePtr
64205b261ecSmrgCreateSolidPicture (Picture pid,
64305b261ecSmrg                    xRenderColor *color,
64405b261ecSmrg                    int *error);
64505b261ecSmrg
64605b261ecSmrgPicturePtr
64705b261ecSmrgCreateLinearGradientPicture (Picture pid,
64805b261ecSmrg                             xPointFixed *p1,
64905b261ecSmrg                             xPointFixed *p2,
65005b261ecSmrg                             int nStops,
65105b261ecSmrg                             xFixed *stops,
65205b261ecSmrg                             xRenderColor *colors,
65305b261ecSmrg                             int *error);
65405b261ecSmrg
65505b261ecSmrgPicturePtr
65605b261ecSmrgCreateRadialGradientPicture (Picture pid,
65705b261ecSmrg                             xPointFixed *inner,
65805b261ecSmrg                             xPointFixed *outer,
65905b261ecSmrg                             xFixed innerRadius,
66005b261ecSmrg                             xFixed outerRadius,
66105b261ecSmrg                             int nStops,
66205b261ecSmrg                             xFixed *stops,
66305b261ecSmrg                             xRenderColor *colors,
66405b261ecSmrg                             int *error);
66505b261ecSmrg
66605b261ecSmrgPicturePtr
66705b261ecSmrgCreateConicalGradientPicture (Picture pid,
66805b261ecSmrg                              xPointFixed *center,
66905b261ecSmrg                              xFixed angle,
67005b261ecSmrg                              int nStops,
67105b261ecSmrg                              xFixed *stops,
67205b261ecSmrg                              xRenderColor *colors,
67305b261ecSmrg                              int *error);
67405b261ecSmrg
67505b261ecSmrg#ifdef PANORAMIX
67605b261ecSmrgvoid PanoramiXRenderInit (void);
67705b261ecSmrgvoid PanoramiXRenderReset (void);
67805b261ecSmrg#endif
67905b261ecSmrg
6804642e01fSmrg/*
6814642e01fSmrg * matrix.c
6824642e01fSmrg */
6834642e01fSmrg
6844642e01fSmrgvoid
6854642e01fSmrgPictTransform_from_xRenderTransform (PictTransformPtr pict,
6864642e01fSmrg				     xRenderTransform *render);
6874642e01fSmrg
6884642e01fSmrgvoid
6894642e01fSmrgxRenderTransform_from_PictTransform (xRenderTransform *render,
6904642e01fSmrg				     PictTransformPtr pict);
6914642e01fSmrg
6924642e01fSmrgBool
6934642e01fSmrgPictureTransformPoint (PictTransformPtr transform,
6944642e01fSmrg		       PictVectorPtr	vector);
6954642e01fSmrg
6964642e01fSmrgBool
6974642e01fSmrgPictureTransformPoint3d (PictTransformPtr transform,
6984642e01fSmrg                         PictVectorPtr	vector);
6994642e01fSmrg
70005b261ecSmrg#endif /* _PICTURESTR_H_ */
701