~ubuntu-branches/ubuntu/intrepid/xserver-xgl/intrepid

« back to all changes in this revision

Viewing changes to render/picturestr.h

  • Committer: Bazaar Package Importer
  • Author(s): Matthew Garrett
  • Date: 2006-02-13 14:21:43 UTC
  • Revision ID: james.westby@ubuntu.com-20060213142143-mad6z9xzem7hzxz9
Tags: upstream-7.0.0
ImportĀ upstreamĀ versionĀ 7.0.0

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
/*
 
2
 * $Id: picturestr.h,v 1.17.4.1 2006/01/18 07:21:43 airlied Exp $
 
3
 *
 
4
 * Copyright Ā© 2000 SuSE, Inc.
 
5
 *
 
6
 * Permission to use, copy, modify, distribute, and sell this software and its
 
7
 * documentation for any purpose is hereby granted without fee, provided that
 
8
 * the above copyright notice appear in all copies and that both that
 
9
 * copyright notice and this permission notice appear in supporting
 
10
 * documentation, and that the name of SuSE not be used in advertising or
 
11
 * publicity pertaining to distribution of the software without specific,
 
12
 * written prior permission.  SuSE makes no representations about the
 
13
 * suitability of this software for any purpose.  It is provided "as is"
 
14
 * without express or implied warranty.
 
15
 *
 
16
 * SuSE DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING ALL
 
17
 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL SuSE
 
18
 * BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
 
19
 * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION
 
20
 * OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN
 
21
 * CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
 
22
 *
 
23
 * Author:  Keith Packard, SuSE, Inc.
 
24
 */
 
25
 
 
26
#ifndef _PICTURESTR_H_
 
27
#define _PICTURESTR_H_
 
28
 
 
29
#include "glyphstr.h"
 
30
#include "scrnintstr.h"
 
31
#include "resource.h"
 
32
 
 
33
#define PictTypeOther 0xff
 
34
 
 
35
typedef struct _DirectFormat {
 
36
    CARD16          red, redMask;
 
37
    CARD16          green, greenMask;
 
38
    CARD16          blue, blueMask;
 
39
    CARD16          alpha, alphaMask;
 
40
} DirectFormatRec;
 
41
 
 
42
typedef struct _IndexFormat {
 
43
    VisualID        vid;
 
44
    ColormapPtr     pColormap;
 
45
    int             nvalues;
 
46
    xIndexValue     *pValues;
 
47
    void            *devPrivate;
 
48
} IndexFormatRec;
 
49
 
 
50
typedef struct _PictFormat {
 
51
    CARD32          id;
 
52
    CARD32          format;         /* except bpp */
 
53
    unsigned char   type;
 
54
    unsigned char   depth;
 
55
    DirectFormatRec direct;
 
56
    IndexFormatRec  index;
 
57
} PictFormatRec;
 
58
 
 
59
typedef struct _PictVector {
 
60
    xFixed          vector[3];
 
61
} PictVector, *PictVectorPtr;
 
62
 
 
63
typedef struct _PictTransform {
 
64
    xFixed          matrix[3][3];
 
65
} PictTransform, *PictTransformPtr;
 
66
 
 
67
typedef void (*DestroySourcePictProcPtr) (PicturePtr pPicture);
 
68
 
 
69
#define PICT_GRADIENT_STOPTABLE_SIZE 1024
 
70
#define SourcePictTypeSolidFill 0
 
71
#define SourcePictTypeLinear    1
 
72
#define SourcePictTypeRadial    2
 
73
#define SourcePictTypeConical   3
 
74
#define SourcePictTypeOther     4
 
75
 
 
76
#define SourcePictClassUnknown    0
 
77
#define SourcePictClassHorizontal 1
 
78
#define SourcePictClassVertical   2
 
79
 
 
80
typedef struct _PictSource {
 
81
    unsigned int type;
 
82
    unsigned int class;
 
83
    DevUnion devPrivate;
 
84
    DestroySourcePictProcPtr Destroy;
 
85
} PictSourceRec, *PictSourcePtr;
 
86
 
 
87
typedef struct _PictSolidFill {
 
88
    unsigned int             type;
 
89
    unsigned int             class;
 
90
    DevUnion                 devPrivate;
 
91
    DestroySourcePictProcPtr Destroy;
 
92
    CARD32 color;
 
93
} PictSolidFill, *PictSolidFillPtr;
 
94
 
 
95
typedef struct _PictGradientStop {
 
96
    xFixed x;
 
97
    CARD32 color;
 
98
} PictGradientStop, *PictGradientStopPtr;
 
99
 
 
100
typedef struct _PictGradient {
 
101
    unsigned int             type;
 
102
    unsigned int             class;
 
103
    DevUnion                 devPrivate;
 
104
    DestroySourcePictProcPtr Destroy;
 
105
    int nstops;
 
106
    PictGradientStopPtr stops;
 
107
    int stopRange;
 
108
    CARD32 *colorTable;
 
109
    int colorTableSize;
 
110
} PictGradient, *PictGradientPtr;
 
111
 
 
112
typedef struct _PictLinearGradient {
 
113
    unsigned int             type;
 
114
    unsigned int             class;
 
115
    DevUnion                 devPrivate;
 
116
    DestroySourcePictProcPtr Destroy;
 
117
    int nstops;
 
118
    PictGradientStopPtr stops;
 
119
    int stopRange;
 
120
    CARD32 *colorTable;
 
121
    int colorTableSize;
 
122
    xPointFixed p1;
 
123
    xPointFixed p2;
 
124
} PictLinearGradient, *PictLinearGradientPtr;
 
125
 
 
126
typedef struct _PictRadialGradient {
 
127
    unsigned int             type;
 
128
    unsigned int             class;
 
129
    DevUnion                 devPrivate;
 
130
    DestroySourcePictProcPtr Destroy;
 
131
    int nstops;
 
132
    PictGradientStopPtr stops;
 
133
    int stopRange;
 
134
    CARD32 *colorTable;
 
135
    int colorTableSize;
 
136
    xPointFixed inner;
 
137
    xPointFixed outer;
 
138
    xFixed inner_radius;
 
139
    xFixed outer_radius;
 
140
    double fx;
 
141
    double fy;
 
142
    double dx;
 
143
    double dy;
 
144
    double a;
 
145
    double m;
 
146
    double b;
 
147
} PictRadialGradient, *PictRadialGradientPtr;
 
148
 
 
149
typedef struct _PictConicalGradient {
 
150
    unsigned int             type;
 
151
    unsigned int             class;
 
152
    DevUnion                 devPrivate;
 
153
    DestroySourcePictProcPtr Destroy;
 
154
    int nstops;
 
155
    PictGradientStopPtr stops;
 
156
    int stopRange;
 
157
    CARD32 *colorTable;
 
158
    int colorTableSize;
 
159
    xPointFixed center;
 
160
    xFixed angle;
 
161
} PictConicalGradient, *PictConicalGradientPtr;
 
162
 
 
163
typedef union _SourcePict {
 
164
    unsigned int type;
 
165
    PictSourceRec source;
 
166
    PictSolidFill solidFill;
 
167
    PictGradient gradient;
 
168
    PictLinearGradient linear;
 
169
    PictRadialGradient radial;
 
170
    PictConicalGradient conical;
 
171
} SourcePict, *SourcePictPtr;
 
172
 
 
173
typedef struct _Picture {
 
174
    DrawablePtr     pDrawable;
 
175
    PictFormatPtr   pFormat;
 
176
    CARD32          format;         /* PICT_FORMAT */
 
177
    int             refcnt;
 
178
    CARD32          id;
 
179
    PicturePtr      pNext;          /* chain on same drawable */
 
180
 
 
181
    unsigned int    repeat : 1;
 
182
    unsigned int    graphicsExposures : 1;
 
183
    unsigned int    subWindowMode : 1;
 
184
    unsigned int    polyEdge : 1;
 
185
    unsigned int    polyMode : 1;
 
186
    unsigned int    freeCompClip : 1;
 
187
    unsigned int    clientClipType : 2;
 
188
    unsigned int    componentAlpha : 1;
 
189
    unsigned int    repeatType : 2;
 
190
    unsigned int    unused : 21;
 
191
 
 
192
    PicturePtr      alphaMap;
 
193
    DDXPointRec     alphaOrigin;
 
194
 
 
195
    DDXPointRec     clipOrigin;
 
196
    pointer         clientClip;
 
197
 
 
198
    Atom            dither;
 
199
 
 
200
    unsigned long   stateChanges;
 
201
    unsigned long   serialNumber;
 
202
 
 
203
    RegionPtr       pCompositeClip;
 
204
 
 
205
    DevUnion        *devPrivates;
 
206
 
 
207
    PictTransform   *transform;
 
208
 
 
209
    int             filter;
 
210
    xFixed          *filter_params;
 
211
    int             filter_nparams;
 
212
    SourcePictPtr   pSourcePict;
 
213
} PictureRec;
 
214
 
 
215
typedef Bool (*PictFilterValidateParamsProcPtr) (PicturePtr pPicture, int id,
 
216
                                                 xFixed *params, int nparams);
 
217
typedef struct {
 
218
    char                            *name;
 
219
    int                             id;
 
220
    PictFilterValidateParamsProcPtr ValidateParams;
 
221
} PictFilterRec, *PictFilterPtr;
 
222
 
 
223
#define PictFilterNearest       0
 
224
#define PictFilterBilinear      1
 
225
 
 
226
#define PictFilterFast          2
 
227
#define PictFilterGood          3
 
228
#define PictFilterBest          4
 
229
 
 
230
#define PictFilterConvolution   5
 
231
 
 
232
typedef struct {
 
233
    char            *alias;
 
234
    int             alias_id;
 
235
    int             filter_id;
 
236
} PictFilterAliasRec, *PictFilterAliasPtr;
 
237
 
 
238
typedef int     (*CreatePictureProcPtr)     (PicturePtr pPicture);
 
239
typedef void    (*DestroyPictureProcPtr)    (PicturePtr pPicture);
 
240
typedef int     (*ChangePictureClipProcPtr) (PicturePtr pPicture,
 
241
                                             int        clipType,
 
242
                                             pointer    value,
 
243
                                             int        n);
 
244
typedef void    (*DestroyPictureClipProcPtr)(PicturePtr pPicture);
 
245
 
 
246
typedef int     (*ChangePictureTransformProcPtr)    (PicturePtr     pPicture,
 
247
                                                     PictTransform  *transform);
 
248
 
 
249
typedef int     (*ChangePictureFilterProcPtr)   (PicturePtr     pPicture,
 
250
                                                 int            filter,
 
251
                                                 xFixed         *params,
 
252
                                                 int            nparams);
 
253
 
 
254
typedef void    (*DestroyPictureFilterProcPtr)  (PicturePtr pPicture);
 
255
 
 
256
typedef void    (*ChangePictureProcPtr)     (PicturePtr pPicture,
 
257
                                             Mask       mask);
 
258
typedef void    (*ValidatePictureProcPtr)    (PicturePtr pPicture,
 
259
                                             Mask       mask);
 
260
typedef void    (*CompositeProcPtr)         (CARD8      op,
 
261
                                             PicturePtr pSrc,
 
262
                                             PicturePtr pMask,
 
263
                                             PicturePtr pDst,
 
264
                                             INT16      xSrc,
 
265
                                             INT16      ySrc,
 
266
                                             INT16      xMask,
 
267
                                             INT16      yMask,
 
268
                                             INT16      xDst,
 
269
                                             INT16      yDst,
 
270
                                             CARD16     width,
 
271
                                             CARD16     height);
 
272
 
 
273
typedef void    (*GlyphsProcPtr)            (CARD8      op,
 
274
                                             PicturePtr pSrc,
 
275
                                             PicturePtr pDst,
 
276
                                             PictFormatPtr  maskFormat,
 
277
                                             INT16      xSrc,
 
278
                                             INT16      ySrc,
 
279
                                             int        nlists,
 
280
                                             GlyphListPtr   lists,
 
281
                                             GlyphPtr   *glyphs);
 
282
 
 
283
typedef void    (*CompositeRectsProcPtr)    (CARD8          op,
 
284
                                             PicturePtr     pDst,
 
285
                                             xRenderColor   *color,
 
286
                                             int            nRect,
 
287
                                             xRectangle     *rects);
 
288
 
 
289
typedef void    (*RasterizeTrapezoidProcPtr)(PicturePtr     pMask,
 
290
                                             xTrapezoid     *trap,
 
291
                                             int            x_off,
 
292
                                             int            y_off);
 
293
 
 
294
typedef void    (*TrapezoidsProcPtr)        (CARD8          op,
 
295
                                             PicturePtr     pSrc,
 
296
                                             PicturePtr     pDst,
 
297
                                             PictFormatPtr  maskFormat,
 
298
                                             INT16          xSrc,
 
299
                                             INT16          ySrc,
 
300
                                             int            ntrap,
 
301
                                             xTrapezoid     *traps);
 
302
 
 
303
typedef void    (*TrianglesProcPtr)         (CARD8          op,
 
304
                                             PicturePtr     pSrc,
 
305
                                             PicturePtr     pDst,
 
306
                                             PictFormatPtr  maskFormat,
 
307
                                             INT16          xSrc,
 
308
                                             INT16          ySrc,
 
309
                                             int            ntri,
 
310
                                             xTriangle      *tris);
 
311
 
 
312
typedef void    (*TriStripProcPtr)          (CARD8          op,
 
313
                                             PicturePtr     pSrc,
 
314
                                             PicturePtr     pDst,
 
315
                                             PictFormatPtr  maskFormat,
 
316
                                             INT16          xSrc,
 
317
                                             INT16          ySrc,
 
318
                                             int            npoint,
 
319
                                             xPointFixed    *points);
 
320
 
 
321
typedef void    (*TriFanProcPtr)            (CARD8          op,
 
322
                                             PicturePtr     pSrc,
 
323
                                             PicturePtr     pDst,
 
324
                                             PictFormatPtr  maskFormat,
 
325
                                             INT16          xSrc,
 
326
                                             INT16          ySrc,
 
327
                                             int            npoint,
 
328
                                             xPointFixed    *points);
 
329
 
 
330
typedef Bool    (*InitIndexedProcPtr)       (ScreenPtr      pScreen,
 
331
                                             PictFormatPtr  pFormat);
 
332
 
 
333
typedef void    (*CloseIndexedProcPtr)      (ScreenPtr      pScreen,
 
334
                                             PictFormatPtr  pFormat);
 
335
 
 
336
typedef void    (*UpdateIndexedProcPtr)     (ScreenPtr      pScreen,
 
337
                                             PictFormatPtr  pFormat,
 
338
                                             int            ndef,
 
339
                                             xColorItem     *pdef);
 
340
 
 
341
typedef void    (*AddTrapsProcPtr)          (PicturePtr     pPicture,
 
342
                                             INT16          xOff,
 
343
                                             INT16          yOff,
 
344
                                             int            ntrap,
 
345
                                             xTrap          *traps);
 
346
 
 
347
typedef void    (*AddTrianglesProcPtr)      (PicturePtr     pPicture,
 
348
                                             INT16          xOff,
 
349
                                             INT16          yOff,
 
350
                                             int            ntri,
 
351
                                             xTriangle      *tris);
 
352
 
 
353
typedef Bool    (*RealizeGlyphProcPtr)      (ScreenPtr      pScreen,
 
354
                                             GlyphPtr       glyph);
 
355
 
 
356
typedef void    (*UnrealizeGlyphProcPtr)    (ScreenPtr      pScreen,
 
357
                                             GlyphPtr       glyph);
 
358
 
 
359
typedef struct _PictureScreen {
 
360
    int                         totalPictureSize;
 
361
    unsigned int                *PicturePrivateSizes;
 
362
    int                         PicturePrivateLen;
 
363
 
 
364
    PictFormatPtr               formats;
 
365
    PictFormatPtr               fallback;
 
366
    int                         nformats;
 
367
 
 
368
    CreatePictureProcPtr        CreatePicture;
 
369
    DestroyPictureProcPtr       DestroyPicture;
 
370
    ChangePictureClipProcPtr    ChangePictureClip;
 
371
    DestroyPictureClipProcPtr   DestroyPictureClip;
 
372
 
 
373
    ChangePictureProcPtr        ChangePicture;
 
374
    ValidatePictureProcPtr      ValidatePicture;
 
375
 
 
376
    CompositeProcPtr            Composite;
 
377
    GlyphsProcPtr               Glyphs;
 
378
    CompositeRectsProcPtr       CompositeRects;
 
379
 
 
380
    DestroyWindowProcPtr        DestroyWindow;
 
381
    CloseScreenProcPtr          CloseScreen;
 
382
 
 
383
    StoreColorsProcPtr          StoreColors;
 
384
 
 
385
    InitIndexedProcPtr          InitIndexed;
 
386
    CloseIndexedProcPtr         CloseIndexed;
 
387
    UpdateIndexedProcPtr        UpdateIndexed;
 
388
 
 
389
    int                         subpixel;
 
390
 
 
391
    PictFilterPtr               filters;
 
392
    int                         nfilters;
 
393
    PictFilterAliasPtr          filterAliases;
 
394
    int                         nfilterAliases;
 
395
 
 
396
    ChangePictureTransformProcPtr   ChangePictureTransform;
 
397
    ChangePictureFilterProcPtr  ChangePictureFilter;
 
398
    DestroyPictureFilterProcPtr DestroyPictureFilter;
 
399
 
 
400
    TrapezoidsProcPtr           Trapezoids;
 
401
    TrianglesProcPtr            Triangles;
 
402
    TriStripProcPtr             TriStrip;
 
403
    TriFanProcPtr               TriFan;
 
404
 
 
405
    RasterizeTrapezoidProcPtr   RasterizeTrapezoid;
 
406
 
 
407
    AddTrianglesProcPtr         AddTriangles;
 
408
 
 
409
    AddTrapsProcPtr             AddTraps;
 
410
 
 
411
    int                         totalGlyphPrivateSize;
 
412
    unsigned int                *glyphPrivateSizes;
 
413
    int                         glyphPrivateLen;
 
414
    int                         glyphPrivateOffset;
 
415
 
 
416
    RealizeGlyphProcPtr         RealizeGlyph;
 
417
    UnrealizeGlyphProcPtr       UnrealizeGlyph;
 
418
 
 
419
} PictureScreenRec, *PictureScreenPtr;
 
420
 
 
421
extern int              PictureScreenPrivateIndex;
 
422
extern int              PictureWindowPrivateIndex;
 
423
extern RESTYPE          PictureType;
 
424
extern RESTYPE          PictFormatType;
 
425
extern RESTYPE          GlyphSetType;
 
426
 
 
427
#define GetPictureScreen(s) ((PictureScreenPtr) ((s)->devPrivates[PictureScreenPrivateIndex].ptr))
 
428
#define GetPictureScreenIfSet(s) ((PictureScreenPrivateIndex != -1) ? GetPictureScreen(s) : NULL)
 
429
#define SetPictureScreen(s,p) ((s)->devPrivates[PictureScreenPrivateIndex].ptr = (pointer) (p))
 
430
#define GetPictureWindow(w) ((PicturePtr) ((w)->devPrivates[PictureWindowPrivateIndex].ptr))
 
431
#define SetPictureWindow(w,p) ((w)->devPrivates[PictureWindowPrivateIndex].ptr = (pointer) (p))
 
432
 
 
433
#define GetGlyphPrivatesForScreen(glyph, s)                             \
 
434
    ((glyph)->devPrivates + (GetPictureScreen (s))->glyphPrivateOffset)
 
435
 
 
436
#define VERIFY_PICTURE(pPicture, pid, client, mode, err) {\
 
437
    pPicture = SecurityLookupIDByType(client, pid, PictureType, mode);\
 
438
    if (!pPicture) { \
 
439
        client->errorValue = pid; \
 
440
        return err; \
 
441
    } \
 
442
}
 
443
 
 
444
#define VERIFY_ALPHA(pPicture, pid, client, mode, err) {\
 
445
    if (pid == None) \
 
446
        pPicture = 0; \
 
447
    else { \
 
448
        VERIFY_PICTURE(pPicture, pid, client, mode, err); \
 
449
    } \
 
450
} \
 
451
 
 
452
void
 
453
ResetPicturePrivateIndex (void);
 
454
 
 
455
int
 
456
AllocatePicturePrivateIndex (void);
 
457
 
 
458
Bool
 
459
AllocatePicturePrivate (ScreenPtr pScreen, int index2, unsigned int amount);
 
460
 
 
461
Bool
 
462
PictureDestroyWindow (WindowPtr pWindow);
 
463
 
 
464
Bool
 
465
PictureCloseScreen (int Index, ScreenPtr pScreen);
 
466
 
 
467
void
 
468
PictureStoreColors (ColormapPtr pColormap, int ndef, xColorItem *pdef);
 
469
 
 
470
Bool
 
471
PictureInitIndexedFormats (ScreenPtr pScreen);
 
472
 
 
473
Bool
 
474
PictureSetSubpixelOrder (ScreenPtr pScreen, int subpixel);
 
475
 
 
476
int
 
477
PictureGetSubpixelOrder (ScreenPtr pScreen);
 
478
 
 
479
PictFormatPtr
 
480
PictureCreateDefaultFormats (ScreenPtr pScreen, int *nformatp);
 
481
 
 
482
PictFormatPtr
 
483
PictureMatchVisual (ScreenPtr pScreen, int depth, VisualPtr pVisual);
 
484
 
 
485
PictFormatPtr
 
486
PictureMatchFormat (ScreenPtr pScreen, int depth, CARD32 format);
 
487
 
 
488
Bool
 
489
PictureInit (ScreenPtr pScreen, PictFormatPtr formats, int nformats);
 
490
 
 
491
int
 
492
PictureGetFilterId (char *filter, int len, Bool makeit);
 
493
 
 
494
char *
 
495
PictureGetFilterName (int id);
 
496
 
 
497
int
 
498
PictureAddFilter (ScreenPtr                         pScreen,
 
499
                  char                              *filter,
 
500
                  PictFilterValidateParamsProcPtr   ValidateParams);
 
501
 
 
502
Bool
 
503
PictureSetFilterAlias (ScreenPtr pScreen, char *filter, char *alias);
 
504
 
 
505
Bool
 
506
PictureSetDefaultFilters (ScreenPtr pScreen);
 
507
 
 
508
void
 
509
PictureResetFilters (ScreenPtr pScreen);
 
510
 
 
511
PictFilterPtr
 
512
PictureFindFilter (ScreenPtr pScreen, char *name, int len);
 
513
 
 
514
int
 
515
SetPictureFilter (PicturePtr pPicture, char *name, int len, xFixed *params, int nparams);
 
516
 
 
517
Bool
 
518
PictureFinishInit (void);
 
519
 
 
520
void
 
521
SetPictureToDefaults (PicturePtr pPicture);
 
522
 
 
523
PicturePtr
 
524
AllocatePicture (ScreenPtr  pScreen);
 
525
 
 
526
#if 0
 
527
Bool
 
528
miPictureInit (ScreenPtr pScreen, PictFormatPtr formats, int nformats);
 
529
#endif
 
530
 
 
531
 
 
532
PicturePtr
 
533
CreatePicture (Picture          pid,
 
534
               DrawablePtr      pDrawable,
 
535
               PictFormatPtr    pFormat,
 
536
               Mask             mask,
 
537
               XID              *list,
 
538
               ClientPtr        client,
 
539
               int              *error);
 
540
 
 
541
int
 
542
ChangePicture (PicturePtr       pPicture,
 
543
               Mask             vmask,
 
544
               XID              *vlist,
 
545
               DevUnion         *ulist,
 
546
               ClientPtr        client);
 
547
 
 
548
int
 
549
SetPictureClipRects (PicturePtr pPicture,
 
550
                     int        xOrigin,
 
551
                     int        yOrigin,
 
552
                     int        nRect,
 
553
                     xRectangle *rects);
 
554
 
 
555
int
 
556
SetPictureClipRegion (PicturePtr    pPicture,
 
557
                      int           xOrigin,
 
558
                      int           yOrigin,
 
559
                      RegionPtr     pRegion);
 
560
 
 
561
int
 
562
SetPictureTransform (PicturePtr     pPicture,
 
563
                     PictTransform  *transform);
 
564
 
 
565
void
 
566
CopyPicture (PicturePtr pSrc,
 
567
             Mask       mask,
 
568
             PicturePtr pDst);
 
569
 
 
570
void
 
571
ValidatePicture(PicturePtr pPicture);
 
572
 
 
573
int
 
574
FreePicture (pointer    pPicture,
 
575
             XID        pid);
 
576
 
 
577
int
 
578
FreePictFormat (pointer pPictFormat,
 
579
                XID     pid);
 
580
 
 
581
void
 
582
CompositePicture (CARD8         op,
 
583
                  PicturePtr    pSrc,
 
584
                  PicturePtr    pMask,
 
585
                  PicturePtr    pDst,
 
586
                  INT16         xSrc,
 
587
                  INT16         ySrc,
 
588
                  INT16         xMask,
 
589
                  INT16         yMask,
 
590
                  INT16         xDst,
 
591
                  INT16         yDst,
 
592
                  CARD16        width,
 
593
                  CARD16        height);
 
594
 
 
595
void
 
596
CompositeGlyphs (CARD8          op,
 
597
                 PicturePtr     pSrc,
 
598
                 PicturePtr     pDst,
 
599
                 PictFormatPtr  maskFormat,
 
600
                 INT16          xSrc,
 
601
                 INT16          ySrc,
 
602
                 int            nlist,
 
603
                 GlyphListPtr   lists,
 
604
                 GlyphPtr       *glyphs);
 
605
 
 
606
void
 
607
CompositeRects (CARD8           op,
 
608
                PicturePtr      pDst,
 
609
                xRenderColor    *color,
 
610
                int             nRect,
 
611
                xRectangle      *rects);
 
612
 
 
613
void
 
614
CompositeTrapezoids (CARD8          op,
 
615
                     PicturePtr     pSrc,
 
616
                     PicturePtr     pDst,
 
617
                     PictFormatPtr  maskFormat,
 
618
                     INT16          xSrc,
 
619
                     INT16          ySrc,
 
620
                     int            ntrap,
 
621
                     xTrapezoid     *traps);
 
622
 
 
623
void
 
624
CompositeTriangles (CARD8           op,
 
625
                    PicturePtr      pSrc,
 
626
                    PicturePtr      pDst,
 
627
                    PictFormatPtr   maskFormat,
 
628
                    INT16           xSrc,
 
629
                    INT16           ySrc,
 
630
                    int             ntriangles,
 
631
                    xTriangle       *triangles);
 
632
 
 
633
void
 
634
CompositeTriStrip (CARD8            op,
 
635
                   PicturePtr       pSrc,
 
636
                   PicturePtr       pDst,
 
637
                   PictFormatPtr    maskFormat,
 
638
                   INT16            xSrc,
 
639
                   INT16            ySrc,
 
640
                   int              npoints,
 
641
                   xPointFixed      *points);
 
642
 
 
643
void
 
644
CompositeTriFan (CARD8          op,
 
645
                 PicturePtr     pSrc,
 
646
                 PicturePtr     pDst,
 
647
                 PictFormatPtr  maskFormat,
 
648
                 INT16          xSrc,
 
649
                 INT16          ySrc,
 
650
                 int            npoints,
 
651
                 xPointFixed    *points);
 
652
 
 
653
Bool
 
654
PictureTransformPoint (PictTransformPtr transform,
 
655
                       PictVectorPtr    vector);
 
656
 
 
657
Bool
 
658
PictureTransformPoint3d (PictTransformPtr transform,
 
659
                         PictVectorPtr  vector);
 
660
 
 
661
CARD32
 
662
PictureGradientColor (PictGradientStopPtr stop1,
 
663
                      PictGradientStopPtr stop2,
 
664
                      CARD32              x);
 
665
 
 
666
void RenderExtensionInit (void);
 
667
 
 
668
Bool
 
669
AnimCurInit (ScreenPtr pScreen);
 
670
 
 
671
int
 
672
AnimCursorCreate (CursorPtr *cursors, CARD32 *deltas, int ncursor, CursorPtr *ppCursor);
 
673
 
 
674
void
 
675
AddTraps (PicturePtr    pPicture,
 
676
          INT16         xOff,
 
677
          INT16         yOff,
 
678
          int           ntraps,
 
679
          xTrap         *traps);
 
680
 
 
681
PicturePtr
 
682
CreateDevicePicture (Picture pid,
 
683
                     int     *error);
 
684
 
 
685
PicturePtr
 
686
CreateSolidPicture (Picture pid,
 
687
                    xRenderColor *color,
 
688
                    int *error);
 
689
 
 
690
PicturePtr
 
691
CreateLinearGradientPicture (Picture pid,
 
692
                             xPointFixed *p1,
 
693
                             xPointFixed *p2,
 
694
                             int nStops,
 
695
                             xFixed *stops,
 
696
                             xRenderColor *colors,
 
697
                             int *error);
 
698
 
 
699
PicturePtr
 
700
CreateRadialGradientPicture (Picture pid,
 
701
                             xPointFixed *inner,
 
702
                             xPointFixed *outer,
 
703
                             xFixed innerRadius,
 
704
                             xFixed outerRadius,
 
705
                             int nStops,
 
706
                             xFixed *stops,
 
707
                             xRenderColor *colors,
 
708
                             int *error);
 
709
 
 
710
PicturePtr
 
711
CreateConicalGradientPicture (Picture pid,
 
712
                              xPointFixed *center,
 
713
                              xFixed angle,
 
714
                              int nStops,
 
715
                              xFixed *stops,
 
716
                              xRenderColor *colors,
 
717
                              int *error);
 
718
 
 
719
#ifdef PANORAMIX
 
720
void PanoramiXRenderInit (void);
 
721
void PanoramiXRenderReset (void);
 
722
#endif
 
723
 
 
724
#endif /* _PICTURESTR_H_ */