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 | typedef struct _PictSolidFill {
|
---|
69 | unsigned int type;
|
---|
70 | CARD32 color;
|
---|
71 | } PictSolidFill, *PictSolidFillPtr;
|
---|
72 |
|
---|
73 | typedef struct _PictGradientStop {
|
---|
74 | xFixed x;
|
---|
75 | xRenderColor color;
|
---|
76 | } PictGradientStop, *PictGradientStopPtr;
|
---|
77 |
|
---|
78 | typedef struct _PictGradient {
|
---|
79 | unsigned int type;
|
---|
80 | int nstops;
|
---|
81 | PictGradientStopPtr stops;
|
---|
82 | } PictGradient, *PictGradientPtr;
|
---|
83 |
|
---|
84 | typedef struct _PictLinearGradient {
|
---|
85 | unsigned int type;
|
---|
86 | int nstops;
|
---|
87 | PictGradientStopPtr stops;
|
---|
88 | xPointFixed p1;
|
---|
89 | xPointFixed p2;
|
---|
90 | } PictLinearGradient, *PictLinearGradientPtr;
|
---|
91 |
|
---|
92 | typedef struct _PictCircle {
|
---|
93 | xFixed x;
|
---|
94 | xFixed y;
|
---|
95 | xFixed radius;
|
---|
96 | } PictCircle, *PictCirclePtr;
|
---|
97 |
|
---|
98 | typedef struct _PictRadialGradient {
|
---|
99 | unsigned int type;
|
---|
100 | int nstops;
|
---|
101 | PictGradientStopPtr stops;
|
---|
102 | PictCircle c1;
|
---|
103 | PictCircle c2;
|
---|
104 | } PictRadialGradient, *PictRadialGradientPtr;
|
---|
105 |
|
---|
106 | typedef struct _PictConicalGradient {
|
---|
107 | unsigned int type;
|
---|
108 | int nstops;
|
---|
109 | PictGradientStopPtr stops;
|
---|
110 | xPointFixed center;
|
---|
111 | xFixed angle;
|
---|
112 | } PictConicalGradient, *PictConicalGradientPtr;
|
---|
113 |
|
---|
114 | typedef union _SourcePict {
|
---|
115 | unsigned int type;
|
---|
116 | PictSolidFill solidFill;
|
---|
117 | PictGradient gradient;
|
---|
118 | PictLinearGradient linear;
|
---|
119 | PictRadialGradient radial;
|
---|
120 | PictConicalGradient conical;
|
---|
121 | } SourcePict, *SourcePictPtr;
|
---|
122 |
|
---|
123 | typedef struct _Picture {
|
---|
124 | DrawablePtr pDrawable;
|
---|
125 | PictFormatPtr pFormat;
|
---|
126 | PictFormatShort format; /* PICT_FORMAT */
|
---|
127 | int refcnt;
|
---|
128 | CARD32 id;
|
---|
129 | unsigned int repeat : 1;
|
---|
130 | unsigned int graphicsExposures : 1;
|
---|
131 | unsigned int subWindowMode : 1;
|
---|
132 | unsigned int polyEdge : 1;
|
---|
133 | unsigned int polyMode : 1;
|
---|
134 | unsigned int freeCompClip : 1;
|
---|
135 | unsigned int clientClipType : 2;
|
---|
136 | unsigned int componentAlpha : 1;
|
---|
137 | unsigned int repeatType : 2;
|
---|
138 | unsigned int filter : 3;
|
---|
139 | unsigned int stateChanges : CPLastBit;
|
---|
140 | unsigned int unused : 18 - CPLastBit;
|
---|
141 |
|
---|
142 | PicturePtr pNext; /* chain on same drawable */
|
---|
143 |
|
---|
144 | PicturePtr alphaMap;
|
---|
145 | DDXPointRec alphaOrigin;
|
---|
146 |
|
---|
147 | DDXPointRec clipOrigin;
|
---|
148 | pointer clientClip;
|
---|
149 |
|
---|
150 | unsigned long serialNumber;
|
---|
151 |
|
---|
152 | RegionPtr pCompositeClip;
|
---|
153 |
|
---|
154 | PrivateRec *devPrivates;
|
---|
155 |
|
---|
156 | PictTransform *transform;
|
---|
157 |
|
---|
158 | SourcePictPtr pSourcePict;
|
---|
159 | xFixed *filter_params;
|
---|
160 | int filter_nparams;
|
---|
161 | } PictureRec;
|
---|
162 |
|
---|
163 | typedef Bool (*PictFilterValidateParamsProcPtr) (ScreenPtr pScreen, int id,
|
---|
164 | xFixed *params, int nparams,
|
---|
165 | int *width, int *height);
|
---|
166 | typedef struct {
|
---|
167 | char *name;
|
---|
168 | int id;
|
---|
169 | PictFilterValidateParamsProcPtr ValidateParams;
|
---|
170 | int width, height;
|
---|
171 | } PictFilterRec, *PictFilterPtr;
|
---|
172 |
|
---|
173 | #define PictFilterNearest 0
|
---|
174 | #define PictFilterBilinear 1
|
---|
175 |
|
---|
176 | #define PictFilterFast 2
|
---|
177 | #define PictFilterGood 3
|
---|
178 | #define PictFilterBest 4
|
---|
179 |
|
---|
180 | #define PictFilterConvolution 5
|
---|
181 | /* if you add an 8th filter, expand the filter bitfield above */
|
---|
182 |
|
---|
183 | typedef struct {
|
---|
184 | char *alias;
|
---|
185 | int alias_id;
|
---|
186 | int filter_id;
|
---|
187 | } PictFilterAliasRec, *PictFilterAliasPtr;
|
---|
188 |
|
---|
189 | typedef int (*CreatePictureProcPtr) (PicturePtr pPicture);
|
---|
190 | typedef void (*DestroyPictureProcPtr) (PicturePtr pPicture);
|
---|
191 | typedef int (*ChangePictureClipProcPtr) (PicturePtr pPicture,
|
---|
192 | int clipType,
|
---|
193 | pointer value,
|
---|
194 | int n);
|
---|
195 | typedef void (*DestroyPictureClipProcPtr)(PicturePtr pPicture);
|
---|
196 |
|
---|
197 | typedef int (*ChangePictureTransformProcPtr) (PicturePtr pPicture,
|
---|
198 | PictTransform *transform);
|
---|
199 |
|
---|
200 | typedef int (*ChangePictureFilterProcPtr) (PicturePtr pPicture,
|
---|
201 | int filter,
|
---|
202 | xFixed *params,
|
---|
203 | int nparams);
|
---|
204 |
|
---|
205 | typedef void (*DestroyPictureFilterProcPtr) (PicturePtr pPicture);
|
---|
206 |
|
---|
207 | typedef void (*ChangePictureProcPtr) (PicturePtr pPicture,
|
---|
208 | Mask mask);
|
---|
209 | typedef void (*ValidatePictureProcPtr) (PicturePtr pPicture,
|
---|
210 | Mask mask);
|
---|
211 | typedef void (*CompositeProcPtr) (CARD8 op,
|
---|
212 | PicturePtr pSrc,
|
---|
213 | PicturePtr pMask,
|
---|
214 | PicturePtr pDst,
|
---|
215 | INT16 xSrc,
|
---|
216 | INT16 ySrc,
|
---|
217 | INT16 xMask,
|
---|
218 | INT16 yMask,
|
---|
219 | INT16 xDst,
|
---|
220 | INT16 yDst,
|
---|
221 | CARD16 width,
|
---|
222 | CARD16 height);
|
---|
223 |
|
---|
224 | typedef void (*GlyphsProcPtr) (CARD8 op,
|
---|
225 | PicturePtr pSrc,
|
---|
226 | PicturePtr pDst,
|
---|
227 | PictFormatPtr maskFormat,
|
---|
228 | INT16 xSrc,
|
---|
229 | INT16 ySrc,
|
---|
230 | int nlists,
|
---|
231 | GlyphListPtr lists,
|
---|
232 | GlyphPtr *glyphs);
|
---|
233 |
|
---|
234 | typedef void (*CompositeRectsProcPtr) (CARD8 op,
|
---|
235 | PicturePtr pDst,
|
---|
236 | xRenderColor *color,
|
---|
237 | int nRect,
|
---|
238 | xRectangle *rects);
|
---|
239 |
|
---|
240 | typedef void (*RasterizeTrapezoidProcPtr)(PicturePtr pMask,
|
---|
241 | xTrapezoid *trap,
|
---|
242 | int x_off,
|
---|
243 | int y_off);
|
---|
244 |
|
---|
245 | typedef void (*TrapezoidsProcPtr) (CARD8 op,
|
---|
246 | PicturePtr pSrc,
|
---|
247 | PicturePtr pDst,
|
---|
248 | PictFormatPtr maskFormat,
|
---|
249 | INT16 xSrc,
|
---|
250 | INT16 ySrc,
|
---|
251 | int ntrap,
|
---|
252 | xTrapezoid *traps);
|
---|
253 |
|
---|
254 | typedef void (*TrianglesProcPtr) (CARD8 op,
|
---|
255 | PicturePtr pSrc,
|
---|
256 | PicturePtr pDst,
|
---|
257 | PictFormatPtr maskFormat,
|
---|
258 | INT16 xSrc,
|
---|
259 | INT16 ySrc,
|
---|
260 | int ntri,
|
---|
261 | xTriangle *tris);
|
---|
262 |
|
---|
263 | typedef void (*TriStripProcPtr) (CARD8 op,
|
---|
264 | PicturePtr pSrc,
|
---|
265 | PicturePtr pDst,
|
---|
266 | PictFormatPtr maskFormat,
|
---|
267 | INT16 xSrc,
|
---|
268 | INT16 ySrc,
|
---|
269 | int npoint,
|
---|
270 | xPointFixed *points);
|
---|
271 |
|
---|
272 | typedef void (*TriFanProcPtr) (CARD8 op,
|
---|
273 | PicturePtr pSrc,
|
---|
274 | PicturePtr pDst,
|
---|
275 | PictFormatPtr maskFormat,
|
---|
276 | INT16 xSrc,
|
---|
277 | INT16 ySrc,
|
---|
278 | int npoint,
|
---|
279 | xPointFixed *points);
|
---|
280 |
|
---|
281 | typedef Bool (*InitIndexedProcPtr) (ScreenPtr pScreen,
|
---|
282 | PictFormatPtr pFormat);
|
---|
283 |
|
---|
284 | typedef void (*CloseIndexedProcPtr) (ScreenPtr pScreen,
|
---|
285 | PictFormatPtr pFormat);
|
---|
286 |
|
---|
287 | typedef void (*UpdateIndexedProcPtr) (ScreenPtr pScreen,
|
---|
288 | PictFormatPtr pFormat,
|
---|
289 | int ndef,
|
---|
290 | xColorItem *pdef);
|
---|
291 |
|
---|
292 | typedef void (*AddTrapsProcPtr) (PicturePtr pPicture,
|
---|
293 | INT16 xOff,
|
---|
294 | INT16 yOff,
|
---|
295 | int ntrap,
|
---|
296 | xTrap *traps);
|
---|
297 |
|
---|
298 | typedef void (*AddTrianglesProcPtr) (PicturePtr pPicture,
|
---|
299 | INT16 xOff,
|
---|
300 | INT16 yOff,
|
---|
301 | int ntri,
|
---|
302 | xTriangle *tris);
|
---|
303 |
|
---|
304 | typedef Bool (*RealizeGlyphProcPtr) (ScreenPtr pScreen,
|
---|
305 | GlyphPtr glyph);
|
---|
306 |
|
---|
307 | typedef void (*UnrealizeGlyphProcPtr) (ScreenPtr pScreen,
|
---|
308 | GlyphPtr glyph);
|
---|
309 |
|
---|
310 | typedef struct _PictureScreen {
|
---|
311 | PictFormatPtr formats;
|
---|
312 | PictFormatPtr fallback;
|
---|
313 | int nformats;
|
---|
314 |
|
---|
315 | CreatePictureProcPtr CreatePicture;
|
---|
316 | DestroyPictureProcPtr DestroyPicture;
|
---|
317 | ChangePictureClipProcPtr ChangePictureClip;
|
---|
318 | DestroyPictureClipProcPtr DestroyPictureClip;
|
---|
319 |
|
---|
320 | ChangePictureProcPtr ChangePicture;
|
---|
321 | ValidatePictureProcPtr ValidatePicture;
|
---|
322 |
|
---|
323 | CompositeProcPtr Composite;
|
---|
324 | GlyphsProcPtr Glyphs; /* unused */
|
---|
325 | CompositeRectsProcPtr CompositeRects;
|
---|
326 |
|
---|
327 | DestroyWindowProcPtr DestroyWindow;
|
---|
328 | CloseScreenProcPtr CloseScreen;
|
---|
329 |
|
---|
330 | StoreColorsProcPtr StoreColors;
|
---|
331 |
|
---|
332 | InitIndexedProcPtr InitIndexed;
|
---|
333 | CloseIndexedProcPtr CloseIndexed;
|
---|
334 | UpdateIndexedProcPtr UpdateIndexed;
|
---|
335 |
|
---|
336 | int subpixel;
|
---|
337 |
|
---|
338 | PictFilterPtr filters;
|
---|
339 | int nfilters;
|
---|
340 | PictFilterAliasPtr filterAliases;
|
---|
341 | int nfilterAliases;
|
---|
342 |
|
---|
343 | /**
|
---|
344 | * Called immediately after a picture's transform is changed through the
|
---|
345 | * SetPictureTransform request. Not called for source-only pictures.
|
---|
346 | */
|
---|
347 | ChangePictureTransformProcPtr ChangePictureTransform;
|
---|
348 |
|
---|
349 | /**
|
---|
350 | * Called immediately after a picture's transform is changed through the
|
---|
351 | * SetPictureFilter request. Not called for source-only pictures.
|
---|
352 | */
|
---|
353 | ChangePictureFilterProcPtr ChangePictureFilter;
|
---|
354 |
|
---|
355 | DestroyPictureFilterProcPtr DestroyPictureFilter;
|
---|
356 |
|
---|
357 | TrapezoidsProcPtr Trapezoids;
|
---|
358 | TrianglesProcPtr Triangles;
|
---|
359 |
|
---|
360 | RasterizeTrapezoidProcPtr RasterizeTrapezoid;
|
---|
361 |
|
---|
362 | AddTrianglesProcPtr AddTriangles;
|
---|
363 |
|
---|
364 | AddTrapsProcPtr AddTraps;
|
---|
365 |
|
---|
366 | RealizeGlyphProcPtr RealizeGlyph;
|
---|
367 | UnrealizeGlyphProcPtr UnrealizeGlyph;
|
---|
368 |
|
---|
369 | #define PICTURE_SCREEN_VERSION 2
|
---|
370 | TriStripProcPtr TriStrip;
|
---|
371 | TriFanProcPtr TriFan;
|
---|
372 | } PictureScreenRec, *PictureScreenPtr;
|
---|
373 |
|
---|
374 | extern _X_EXPORT DevPrivateKeyRec PictureScreenPrivateKeyRec;
|
---|
375 | #define PictureScreenPrivateKey (&PictureScreenPrivateKeyRec)
|
---|
376 |
|
---|
377 | extern _X_EXPORT DevPrivateKeyRec PictureWindowPrivateKeyRec;
|
---|
378 | #define PictureWindowPrivateKey (&PictureWindowPrivateKeyRec)
|
---|
379 |
|
---|
380 | extern _X_EXPORT RESTYPE PictureType;
|
---|
381 | extern _X_EXPORT RESTYPE PictFormatType;
|
---|
382 | extern _X_EXPORT RESTYPE GlyphSetType;
|
---|
383 |
|
---|
384 | #define GetPictureScreen(s) ((PictureScreenPtr)dixLookupPrivate(&(s)->devPrivates, PictureScreenPrivateKey))
|
---|
385 | #define GetPictureScreenIfSet(s) (dixPrivateKeyRegistered(PictureScreenPrivateKey) ? GetPictureScreen(s) : NULL)
|
---|
386 | #define SetPictureScreen(s,p) dixSetPrivate(&(s)->devPrivates, PictureScreenPrivateKey, p)
|
---|
387 | #define GetPictureWindow(w) ((PicturePtr)dixLookupPrivate(&(w)->devPrivates, PictureWindowPrivateKey))
|
---|
388 | #define SetPictureWindow(w,p) dixSetPrivate(&(w)->devPrivates, PictureWindowPrivateKey, p)
|
---|
389 |
|
---|
390 | #define VERIFY_PICTURE(pPicture, pid, client, mode) {\
|
---|
391 | int rc = dixLookupResourceByType((pointer)&(pPicture), pid,\
|
---|
392 | PictureType, client, mode);\
|
---|
393 | if (rc != Success)\
|
---|
394 | return rc;\
|
---|
395 | }
|
---|
396 |
|
---|
397 | #define VERIFY_ALPHA(pPicture, pid, client, mode) {\
|
---|
398 | if (pid == None) \
|
---|
399 | pPicture = 0; \
|
---|
400 | else { \
|
---|
401 | VERIFY_PICTURE(pPicture, pid, client, mode); \
|
---|
402 | } \
|
---|
403 | } \
|
---|
404 |
|
---|
405 | extern _X_EXPORT Bool
|
---|
406 | PictureDestroyWindow (WindowPtr pWindow);
|
---|
407 |
|
---|
408 | extern _X_EXPORT Bool
|
---|
409 | PictureCloseScreen (int Index, ScreenPtr pScreen);
|
---|
410 |
|
---|
411 | extern _X_EXPORT void
|
---|
412 | PictureStoreColors (ColormapPtr pColormap, int ndef, xColorItem *pdef);
|
---|
413 |
|
---|
414 | extern _X_EXPORT Bool
|
---|
415 | PictureInitIndexedFormat (ScreenPtr pScreen, PictFormatPtr format);
|
---|
416 |
|
---|
417 | extern _X_EXPORT Bool
|
---|
418 | PictureSetSubpixelOrder (ScreenPtr pScreen, int subpixel);
|
---|
419 |
|
---|
420 | extern _X_EXPORT int
|
---|
421 | PictureGetSubpixelOrder (ScreenPtr pScreen);
|
---|
422 |
|
---|
423 | extern _X_EXPORT PictFormatPtr
|
---|
424 | PictureCreateDefaultFormats (ScreenPtr pScreen, int *nformatp);
|
---|
425 |
|
---|
426 | extern _X_EXPORT PictFormatPtr
|
---|
427 | PictureMatchVisual (ScreenPtr pScreen, int depth, VisualPtr pVisual);
|
---|
428 |
|
---|
429 | extern _X_EXPORT PictFormatPtr
|
---|
430 | PictureMatchFormat (ScreenPtr pScreen, int depth, CARD32 format);
|
---|
431 |
|
---|
432 | extern _X_EXPORT Bool
|
---|
433 | PictureInit (ScreenPtr pScreen, PictFormatPtr formats, int nformats);
|
---|
434 |
|
---|
435 | extern _X_EXPORT int
|
---|
436 | PictureGetFilterId (const char *filter, int len, Bool makeit);
|
---|
437 |
|
---|
438 | extern _X_EXPORT char *
|
---|
439 | PictureGetFilterName (int id);
|
---|
440 |
|
---|
441 | extern _X_EXPORT int
|
---|
442 | PictureAddFilter (ScreenPtr pScreen,
|
---|
443 | const char *filter,
|
---|
444 | PictFilterValidateParamsProcPtr ValidateParams,
|
---|
445 | int width,
|
---|
446 | int height);
|
---|
447 |
|
---|
448 | extern _X_EXPORT Bool
|
---|
449 | PictureSetFilterAlias (ScreenPtr pScreen, const char *filter, const char *alias);
|
---|
450 |
|
---|
451 | extern _X_EXPORT Bool
|
---|
452 | PictureSetDefaultFilters (ScreenPtr pScreen);
|
---|
453 |
|
---|
454 | extern _X_EXPORT void
|
---|
455 | PictureResetFilters (ScreenPtr pScreen);
|
---|
456 |
|
---|
457 | extern _X_EXPORT PictFilterPtr
|
---|
458 | PictureFindFilter (ScreenPtr pScreen, char *name, int len);
|
---|
459 |
|
---|
460 | extern _X_EXPORT int
|
---|
461 | SetPicturePictFilter (PicturePtr pPicture, PictFilterPtr pFilter,
|
---|
462 | xFixed *params, int nparams);
|
---|
463 |
|
---|
464 | extern _X_EXPORT int
|
---|
465 | SetPictureFilter (PicturePtr pPicture, char *name, int len,
|
---|
466 | xFixed *params, int nparams);
|
---|
467 |
|
---|
468 | extern _X_EXPORT Bool
|
---|
469 | PictureFinishInit (void);
|
---|
470 |
|
---|
471 | extern _X_EXPORT void
|
---|
472 | SetPictureToDefaults (PicturePtr pPicture);
|
---|
473 |
|
---|
474 | extern _X_EXPORT PicturePtr
|
---|
475 | CreatePicture (Picture pid,
|
---|
476 | DrawablePtr pDrawable,
|
---|
477 | PictFormatPtr pFormat,
|
---|
478 | Mask mask,
|
---|
479 | XID *list,
|
---|
480 | ClientPtr client,
|
---|
481 | int *error);
|
---|
482 |
|
---|
483 | extern _X_EXPORT int
|
---|
484 | ChangePicture (PicturePtr pPicture,
|
---|
485 | Mask vmask,
|
---|
486 | XID *vlist,
|
---|
487 | DevUnion *ulist,
|
---|
488 | ClientPtr client);
|
---|
489 |
|
---|
490 | extern _X_EXPORT int
|
---|
491 | SetPictureClipRects (PicturePtr pPicture,
|
---|
492 | int xOrigin,
|
---|
493 | int yOrigin,
|
---|
494 | int nRect,
|
---|
495 | xRectangle *rects);
|
---|
496 |
|
---|
497 | extern _X_EXPORT int
|
---|
498 | SetPictureClipRegion (PicturePtr pPicture,
|
---|
499 | int xOrigin,
|
---|
500 | int yOrigin,
|
---|
501 | RegionPtr pRegion);
|
---|
502 |
|
---|
503 | extern _X_EXPORT int
|
---|
504 | SetPictureTransform (PicturePtr pPicture,
|
---|
505 | PictTransform *transform);
|
---|
506 |
|
---|
507 | extern _X_EXPORT void
|
---|
508 | CopyPicture (PicturePtr pSrc,
|
---|
509 | Mask mask,
|
---|
510 | PicturePtr pDst);
|
---|
511 |
|
---|
512 | extern _X_EXPORT void
|
---|
513 | ValidatePicture(PicturePtr pPicture);
|
---|
514 |
|
---|
515 | extern _X_EXPORT int
|
---|
516 | FreePicture (pointer pPicture,
|
---|
517 | XID pid);
|
---|
518 |
|
---|
519 | extern _X_EXPORT int
|
---|
520 | FreePictFormat (pointer pPictFormat,
|
---|
521 | XID pid);
|
---|
522 |
|
---|
523 | extern _X_EXPORT void
|
---|
524 | CompositePicture (CARD8 op,
|
---|
525 | PicturePtr pSrc,
|
---|
526 | PicturePtr pMask,
|
---|
527 | PicturePtr pDst,
|
---|
528 | INT16 xSrc,
|
---|
529 | INT16 ySrc,
|
---|
530 | INT16 xMask,
|
---|
531 | INT16 yMask,
|
---|
532 | INT16 xDst,
|
---|
533 | INT16 yDst,
|
---|
534 | CARD16 width,
|
---|
535 | CARD16 height);
|
---|
536 |
|
---|
537 | extern _X_EXPORT void
|
---|
538 | CompositeGlyphs (CARD8 op,
|
---|
539 | PicturePtr pSrc,
|
---|
540 | PicturePtr pDst,
|
---|
541 | PictFormatPtr maskFormat,
|
---|
542 | INT16 xSrc,
|
---|
543 | INT16 ySrc,
|
---|
544 | int nlist,
|
---|
545 | GlyphListPtr lists,
|
---|
546 | GlyphPtr *glyphs);
|
---|
547 |
|
---|
548 | extern _X_EXPORT void
|
---|
549 | CompositeRects (CARD8 op,
|
---|
550 | PicturePtr pDst,
|
---|
551 | xRenderColor *color,
|
---|
552 | int nRect,
|
---|
553 | xRectangle *rects);
|
---|
554 |
|
---|
555 | extern _X_EXPORT void
|
---|
556 | CompositeTrapezoids (CARD8 op,
|
---|
557 | PicturePtr pSrc,
|
---|
558 | PicturePtr pDst,
|
---|
559 | PictFormatPtr maskFormat,
|
---|
560 | INT16 xSrc,
|
---|
561 | INT16 ySrc,
|
---|
562 | int ntrap,
|
---|
563 | xTrapezoid *traps);
|
---|
564 |
|
---|
565 | extern _X_EXPORT void
|
---|
566 | CompositeTriangles (CARD8 op,
|
---|
567 | PicturePtr pSrc,
|
---|
568 | PicturePtr pDst,
|
---|
569 | PictFormatPtr maskFormat,
|
---|
570 | INT16 xSrc,
|
---|
571 | INT16 ySrc,
|
---|
572 | int ntriangles,
|
---|
573 | xTriangle *triangles);
|
---|
574 |
|
---|
575 | extern _X_EXPORT void
|
---|
576 | CompositeTriStrip (CARD8 op,
|
---|
577 | PicturePtr pSrc,
|
---|
578 | PicturePtr pDst,
|
---|
579 | PictFormatPtr maskFormat,
|
---|
580 | INT16 xSrc,
|
---|
581 | INT16 ySrc,
|
---|
582 | int npoints,
|
---|
583 | xPointFixed *points);
|
---|
584 |
|
---|
585 | extern _X_EXPORT void
|
---|
586 | CompositeTriFan (CARD8 op,
|
---|
587 | PicturePtr pSrc,
|
---|
588 | PicturePtr pDst,
|
---|
589 | PictFormatPtr maskFormat,
|
---|
590 | INT16 xSrc,
|
---|
591 | INT16 ySrc,
|
---|
592 | int npoints,
|
---|
593 | xPointFixed *points);
|
---|
594 |
|
---|
595 | extern _X_EXPORT void RenderExtensionInit (void);
|
---|
596 |
|
---|
597 | Bool
|
---|
598 | AnimCurInit (ScreenPtr pScreen);
|
---|
599 |
|
---|
600 | int
|
---|
601 | AnimCursorCreate (CursorPtr *cursors, CARD32 *deltas, int ncursor, CursorPtr *ppCursor, ClientPtr client, XID cid);
|
---|
602 |
|
---|
603 | extern _X_EXPORT void
|
---|
604 | AddTraps (PicturePtr pPicture,
|
---|
605 | INT16 xOff,
|
---|
606 | INT16 yOff,
|
---|
607 | int ntraps,
|
---|
608 | xTrap *traps);
|
---|
609 |
|
---|
610 | extern _X_EXPORT PicturePtr
|
---|
611 | CreateSolidPicture (Picture pid,
|
---|
612 | xRenderColor *color,
|
---|
613 | int *error);
|
---|
614 |
|
---|
615 | extern _X_EXPORT PicturePtr
|
---|
616 | CreateLinearGradientPicture (Picture pid,
|
---|
617 | xPointFixed *p1,
|
---|
618 | xPointFixed *p2,
|
---|
619 | int nStops,
|
---|
620 | xFixed *stops,
|
---|
621 | xRenderColor *colors,
|
---|
622 | int *error);
|
---|
623 |
|
---|
624 | extern _X_EXPORT PicturePtr
|
---|
625 | CreateRadialGradientPicture (Picture pid,
|
---|
626 | xPointFixed *inner,
|
---|
627 | xPointFixed *outer,
|
---|
628 | xFixed innerRadius,
|
---|
629 | xFixed outerRadius,
|
---|
630 | int nStops,
|
---|
631 | xFixed *stops,
|
---|
632 | xRenderColor *colors,
|
---|
633 | int *error);
|
---|
634 |
|
---|
635 | extern _X_EXPORT PicturePtr
|
---|
636 | CreateConicalGradientPicture (Picture pid,
|
---|
637 | xPointFixed *center,
|
---|
638 | xFixed angle,
|
---|
639 | int nStops,
|
---|
640 | xFixed *stops,
|
---|
641 | xRenderColor *colors,
|
---|
642 | int *error);
|
---|
643 |
|
---|
644 | #ifdef PANORAMIX
|
---|
645 | extern _X_EXPORT void PanoramiXRenderInit (void);
|
---|
646 | extern _X_EXPORT void PanoramiXRenderReset (void);
|
---|
647 | #endif
|
---|
648 |
|
---|
649 | /*
|
---|
650 | * matrix.c
|
---|
651 | */
|
---|
652 |
|
---|
653 | extern _X_EXPORT void
|
---|
654 | PictTransform_from_xRenderTransform (PictTransformPtr pict,
|
---|
655 | xRenderTransform *render);
|
---|
656 |
|
---|
657 | extern _X_EXPORT void
|
---|
658 | xRenderTransform_from_PictTransform (xRenderTransform *render,
|
---|
659 | PictTransformPtr pict);
|
---|
660 |
|
---|
661 | extern _X_EXPORT Bool
|
---|
662 | PictureTransformPoint (PictTransformPtr transform,
|
---|
663 | PictVectorPtr vector);
|
---|
664 |
|
---|
665 | extern _X_EXPORT Bool
|
---|
666 | PictureTransformPoint3d (PictTransformPtr transform,
|
---|
667 | PictVectorPtr vector);
|
---|
668 |
|
---|
669 | #endif /* _PICTURESTR_H_ */
|
---|