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