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 Bool (*InitIndexedProcPtr) (ScreenPtr pScreen,
|
---|
264 | PictFormatPtr pFormat);
|
---|
265 |
|
---|
266 | typedef void (*CloseIndexedProcPtr) (ScreenPtr pScreen,
|
---|
267 | PictFormatPtr pFormat);
|
---|
268 |
|
---|
269 | typedef void (*UpdateIndexedProcPtr) (ScreenPtr pScreen,
|
---|
270 | PictFormatPtr pFormat,
|
---|
271 | int ndef,
|
---|
272 | xColorItem *pdef);
|
---|
273 |
|
---|
274 | typedef void (*AddTrapsProcPtr) (PicturePtr pPicture,
|
---|
275 | INT16 xOff,
|
---|
276 | INT16 yOff,
|
---|
277 | int ntrap,
|
---|
278 | xTrap *traps);
|
---|
279 |
|
---|
280 | typedef void (*AddTrianglesProcPtr) (PicturePtr pPicture,
|
---|
281 | INT16 xOff,
|
---|
282 | INT16 yOff,
|
---|
283 | int ntri,
|
---|
284 | xTriangle *tris);
|
---|
285 |
|
---|
286 | typedef Bool (*RealizeGlyphProcPtr) (ScreenPtr pScreen,
|
---|
287 | GlyphPtr glyph);
|
---|
288 |
|
---|
289 | typedef void (*UnrealizeGlyphProcPtr) (ScreenPtr pScreen,
|
---|
290 | GlyphPtr glyph);
|
---|
291 |
|
---|
292 | typedef struct _PictureScreen {
|
---|
293 | PictFormatPtr formats;
|
---|
294 | PictFormatPtr fallback;
|
---|
295 | int nformats;
|
---|
296 |
|
---|
297 | CreatePictureProcPtr CreatePicture;
|
---|
298 | DestroyPictureProcPtr DestroyPicture;
|
---|
299 | ChangePictureClipProcPtr ChangePictureClip;
|
---|
300 | DestroyPictureClipProcPtr DestroyPictureClip;
|
---|
301 |
|
---|
302 | ChangePictureProcPtr ChangePicture;
|
---|
303 | ValidatePictureProcPtr ValidatePicture;
|
---|
304 |
|
---|
305 | CompositeProcPtr Composite;
|
---|
306 | GlyphsProcPtr Glyphs; /* unused */
|
---|
307 | CompositeRectsProcPtr CompositeRects;
|
---|
308 |
|
---|
309 | DestroyWindowProcPtr DestroyWindow;
|
---|
310 | CloseScreenProcPtr CloseScreen;
|
---|
311 |
|
---|
312 | StoreColorsProcPtr StoreColors;
|
---|
313 |
|
---|
314 | InitIndexedProcPtr InitIndexed;
|
---|
315 | CloseIndexedProcPtr CloseIndexed;
|
---|
316 | UpdateIndexedProcPtr UpdateIndexed;
|
---|
317 |
|
---|
318 | int subpixel;
|
---|
319 |
|
---|
320 | PictFilterPtr filters;
|
---|
321 | int nfilters;
|
---|
322 | PictFilterAliasPtr filterAliases;
|
---|
323 | int nfilterAliases;
|
---|
324 |
|
---|
325 | /**
|
---|
326 | * Called immediately after a picture's transform is changed through the
|
---|
327 | * SetPictureTransform request. Not called for source-only pictures.
|
---|
328 | */
|
---|
329 | ChangePictureTransformProcPtr ChangePictureTransform;
|
---|
330 |
|
---|
331 | /**
|
---|
332 | * Called immediately after a picture's transform is changed through the
|
---|
333 | * SetPictureFilter request. Not called for source-only pictures.
|
---|
334 | */
|
---|
335 | ChangePictureFilterProcPtr ChangePictureFilter;
|
---|
336 |
|
---|
337 | DestroyPictureFilterProcPtr DestroyPictureFilter;
|
---|
338 |
|
---|
339 | TrapezoidsProcPtr Trapezoids;
|
---|
340 | TrianglesProcPtr Triangles;
|
---|
341 |
|
---|
342 | RasterizeTrapezoidProcPtr RasterizeTrapezoid;
|
---|
343 |
|
---|
344 | AddTrianglesProcPtr AddTriangles;
|
---|
345 |
|
---|
346 | AddTrapsProcPtr AddTraps;
|
---|
347 |
|
---|
348 | RealizeGlyphProcPtr RealizeGlyph;
|
---|
349 | UnrealizeGlyphProcPtr UnrealizeGlyph;
|
---|
350 |
|
---|
351 | } PictureScreenRec, *PictureScreenPtr;
|
---|
352 |
|
---|
353 | extern _X_EXPORT DevPrivateKeyRec PictureScreenPrivateKeyRec;
|
---|
354 | #define PictureScreenPrivateKey (&PictureScreenPrivateKeyRec)
|
---|
355 |
|
---|
356 | extern _X_EXPORT DevPrivateKeyRec PictureWindowPrivateKeyRec;
|
---|
357 | #define PictureWindowPrivateKey (&PictureWindowPrivateKeyRec)
|
---|
358 |
|
---|
359 | extern _X_EXPORT RESTYPE PictureType;
|
---|
360 | extern _X_EXPORT RESTYPE PictFormatType;
|
---|
361 | extern _X_EXPORT RESTYPE GlyphSetType;
|
---|
362 |
|
---|
363 | #define GetPictureScreen(s) ((PictureScreenPtr)dixLookupPrivate(&(s)->devPrivates, PictureScreenPrivateKey))
|
---|
364 | #define GetPictureScreenIfSet(s) (dixPrivateKeyRegistered(PictureScreenPrivateKey) ? GetPictureScreen(s) : NULL)
|
---|
365 | #define SetPictureScreen(s,p) dixSetPrivate(&(s)->devPrivates, PictureScreenPrivateKey, p)
|
---|
366 | #define GetPictureWindow(w) ((PicturePtr)dixLookupPrivate(&(w)->devPrivates, PictureWindowPrivateKey))
|
---|
367 | #define SetPictureWindow(w,p) dixSetPrivate(&(w)->devPrivates, PictureWindowPrivateKey, p)
|
---|
368 |
|
---|
369 | #define VERIFY_PICTURE(pPicture, pid, client, mode) {\
|
---|
370 | int rc = dixLookupResourceByType((pointer)&(pPicture), pid,\
|
---|
371 | PictureType, client, mode);\
|
---|
372 | if (rc != Success)\
|
---|
373 | return rc;\
|
---|
374 | }
|
---|
375 |
|
---|
376 | #define VERIFY_ALPHA(pPicture, pid, client, mode) {\
|
---|
377 | if (pid == None) \
|
---|
378 | pPicture = 0; \
|
---|
379 | else { \
|
---|
380 | VERIFY_PICTURE(pPicture, pid, client, mode); \
|
---|
381 | } \
|
---|
382 | } \
|
---|
383 |
|
---|
384 | extern _X_EXPORT Bool
|
---|
385 | PictureDestroyWindow (WindowPtr pWindow);
|
---|
386 |
|
---|
387 | extern _X_EXPORT Bool
|
---|
388 | PictureCloseScreen (int Index, ScreenPtr pScreen);
|
---|
389 |
|
---|
390 | extern _X_EXPORT void
|
---|
391 | PictureStoreColors (ColormapPtr pColormap, int ndef, xColorItem *pdef);
|
---|
392 |
|
---|
393 | extern _X_EXPORT Bool
|
---|
394 | PictureInitIndexedFormat (ScreenPtr pScreen, PictFormatPtr format);
|
---|
395 |
|
---|
396 | extern _X_EXPORT Bool
|
---|
397 | PictureSetSubpixelOrder (ScreenPtr pScreen, int subpixel);
|
---|
398 |
|
---|
399 | extern _X_EXPORT int
|
---|
400 | PictureGetSubpixelOrder (ScreenPtr pScreen);
|
---|
401 |
|
---|
402 | extern _X_EXPORT PictFormatPtr
|
---|
403 | PictureCreateDefaultFormats (ScreenPtr pScreen, int *nformatp);
|
---|
404 |
|
---|
405 | extern _X_EXPORT PictFormatPtr
|
---|
406 | PictureMatchVisual (ScreenPtr pScreen, int depth, VisualPtr pVisual);
|
---|
407 |
|
---|
408 | extern _X_EXPORT PictFormatPtr
|
---|
409 | PictureMatchFormat (ScreenPtr pScreen, int depth, CARD32 format);
|
---|
410 |
|
---|
411 | extern _X_EXPORT Bool
|
---|
412 | PictureInit (ScreenPtr pScreen, PictFormatPtr formats, int nformats);
|
---|
413 |
|
---|
414 | extern _X_EXPORT int
|
---|
415 | PictureGetFilterId (char *filter, int len, Bool makeit);
|
---|
416 |
|
---|
417 | extern _X_EXPORT char *
|
---|
418 | PictureGetFilterName (int id);
|
---|
419 |
|
---|
420 | extern _X_EXPORT int
|
---|
421 | PictureAddFilter (ScreenPtr pScreen,
|
---|
422 | char *filter,
|
---|
423 | PictFilterValidateParamsProcPtr ValidateParams,
|
---|
424 | int width,
|
---|
425 | int height);
|
---|
426 |
|
---|
427 | extern _X_EXPORT Bool
|
---|
428 | PictureSetFilterAlias (ScreenPtr pScreen, char *filter, char *alias);
|
---|
429 |
|
---|
430 | extern _X_EXPORT Bool
|
---|
431 | PictureSetDefaultFilters (ScreenPtr pScreen);
|
---|
432 |
|
---|
433 | extern _X_EXPORT void
|
---|
434 | PictureResetFilters (ScreenPtr pScreen);
|
---|
435 |
|
---|
436 | extern _X_EXPORT PictFilterPtr
|
---|
437 | PictureFindFilter (ScreenPtr pScreen, char *name, int len);
|
---|
438 |
|
---|
439 | extern _X_EXPORT int
|
---|
440 | SetPicturePictFilter (PicturePtr pPicture, PictFilterPtr pFilter,
|
---|
441 | xFixed *params, int nparams);
|
---|
442 |
|
---|
443 | extern _X_EXPORT int
|
---|
444 | SetPictureFilter (PicturePtr pPicture, char *name, int len,
|
---|
445 | xFixed *params, int nparams);
|
---|
446 |
|
---|
447 | extern _X_EXPORT Bool
|
---|
448 | PictureFinishInit (void);
|
---|
449 |
|
---|
450 | extern _X_EXPORT void
|
---|
451 | SetPictureToDefaults (PicturePtr pPicture);
|
---|
452 |
|
---|
453 | extern _X_EXPORT PicturePtr
|
---|
454 | CreatePicture (Picture pid,
|
---|
455 | DrawablePtr pDrawable,
|
---|
456 | PictFormatPtr pFormat,
|
---|
457 | Mask mask,
|
---|
458 | XID *list,
|
---|
459 | ClientPtr client,
|
---|
460 | int *error);
|
---|
461 |
|
---|
462 | extern _X_EXPORT int
|
---|
463 | ChangePicture (PicturePtr pPicture,
|
---|
464 | Mask vmask,
|
---|
465 | XID *vlist,
|
---|
466 | DevUnion *ulist,
|
---|
467 | ClientPtr client);
|
---|
468 |
|
---|
469 | extern _X_EXPORT int
|
---|
470 | SetPictureClipRects (PicturePtr pPicture,
|
---|
471 | int xOrigin,
|
---|
472 | int yOrigin,
|
---|
473 | int nRect,
|
---|
474 | xRectangle *rects);
|
---|
475 |
|
---|
476 | extern _X_EXPORT int
|
---|
477 | SetPictureClipRegion (PicturePtr pPicture,
|
---|
478 | int xOrigin,
|
---|
479 | int yOrigin,
|
---|
480 | RegionPtr pRegion);
|
---|
481 |
|
---|
482 | extern _X_EXPORT int
|
---|
483 | SetPictureTransform (PicturePtr pPicture,
|
---|
484 | PictTransform *transform);
|
---|
485 |
|
---|
486 | extern _X_EXPORT void
|
---|
487 | CopyPicture (PicturePtr pSrc,
|
---|
488 | Mask mask,
|
---|
489 | PicturePtr pDst);
|
---|
490 |
|
---|
491 | extern _X_EXPORT void
|
---|
492 | ValidatePicture(PicturePtr pPicture);
|
---|
493 |
|
---|
494 | extern _X_EXPORT int
|
---|
495 | FreePicture (pointer pPicture,
|
---|
496 | XID pid);
|
---|
497 |
|
---|
498 | extern _X_EXPORT int
|
---|
499 | FreePictFormat (pointer pPictFormat,
|
---|
500 | XID pid);
|
---|
501 |
|
---|
502 | extern _X_EXPORT void
|
---|
503 | CompositePicture (CARD8 op,
|
---|
504 | PicturePtr pSrc,
|
---|
505 | PicturePtr pMask,
|
---|
506 | PicturePtr pDst,
|
---|
507 | INT16 xSrc,
|
---|
508 | INT16 ySrc,
|
---|
509 | INT16 xMask,
|
---|
510 | INT16 yMask,
|
---|
511 | INT16 xDst,
|
---|
512 | INT16 yDst,
|
---|
513 | CARD16 width,
|
---|
514 | CARD16 height);
|
---|
515 |
|
---|
516 | extern _X_EXPORT void
|
---|
517 | CompositeGlyphs (CARD8 op,
|
---|
518 | PicturePtr pSrc,
|
---|
519 | PicturePtr pDst,
|
---|
520 | PictFormatPtr maskFormat,
|
---|
521 | INT16 xSrc,
|
---|
522 | INT16 ySrc,
|
---|
523 | int nlist,
|
---|
524 | GlyphListPtr lists,
|
---|
525 | GlyphPtr *glyphs);
|
---|
526 |
|
---|
527 | extern _X_EXPORT void
|
---|
528 | CompositeRects (CARD8 op,
|
---|
529 | PicturePtr pDst,
|
---|
530 | xRenderColor *color,
|
---|
531 | int nRect,
|
---|
532 | xRectangle *rects);
|
---|
533 |
|
---|
534 | extern _X_EXPORT void
|
---|
535 | CompositeTrapezoids (CARD8 op,
|
---|
536 | PicturePtr pSrc,
|
---|
537 | PicturePtr pDst,
|
---|
538 | PictFormatPtr maskFormat,
|
---|
539 | INT16 xSrc,
|
---|
540 | INT16 ySrc,
|
---|
541 | int ntrap,
|
---|
542 | xTrapezoid *traps);
|
---|
543 |
|
---|
544 | extern _X_EXPORT void
|
---|
545 | CompositeTriangles (CARD8 op,
|
---|
546 | PicturePtr pSrc,
|
---|
547 | PicturePtr pDst,
|
---|
548 | PictFormatPtr maskFormat,
|
---|
549 | INT16 xSrc,
|
---|
550 | INT16 ySrc,
|
---|
551 | int ntriangles,
|
---|
552 | xTriangle *triangles);
|
---|
553 |
|
---|
554 | extern _X_EXPORT void
|
---|
555 | CompositeTriStrip (CARD8 op,
|
---|
556 | PicturePtr pSrc,
|
---|
557 | PicturePtr pDst,
|
---|
558 | PictFormatPtr maskFormat,
|
---|
559 | INT16 xSrc,
|
---|
560 | INT16 ySrc,
|
---|
561 | int npoints,
|
---|
562 | xPointFixed *points);
|
---|
563 |
|
---|
564 | extern _X_EXPORT void
|
---|
565 | CompositeTriFan (CARD8 op,
|
---|
566 | PicturePtr pSrc,
|
---|
567 | PicturePtr pDst,
|
---|
568 | PictFormatPtr maskFormat,
|
---|
569 | INT16 xSrc,
|
---|
570 | INT16 ySrc,
|
---|
571 | int npoints,
|
---|
572 | xPointFixed *points);
|
---|
573 |
|
---|
574 | extern _X_EXPORT void RenderExtensionInit (void);
|
---|
575 |
|
---|
576 | Bool
|
---|
577 | AnimCurInit (ScreenPtr pScreen);
|
---|
578 |
|
---|
579 | int
|
---|
580 | AnimCursorCreate (CursorPtr *cursors, CARD32 *deltas, int ncursor, CursorPtr *ppCursor, ClientPtr client, XID cid);
|
---|
581 |
|
---|
582 | extern _X_EXPORT void
|
---|
583 | AddTraps (PicturePtr pPicture,
|
---|
584 | INT16 xOff,
|
---|
585 | INT16 yOff,
|
---|
586 | int ntraps,
|
---|
587 | xTrap *traps);
|
---|
588 |
|
---|
589 | extern _X_EXPORT PicturePtr
|
---|
590 | CreateSolidPicture (Picture pid,
|
---|
591 | xRenderColor *color,
|
---|
592 | int *error);
|
---|
593 |
|
---|
594 | extern _X_EXPORT PicturePtr
|
---|
595 | CreateLinearGradientPicture (Picture pid,
|
---|
596 | xPointFixed *p1,
|
---|
597 | xPointFixed *p2,
|
---|
598 | int nStops,
|
---|
599 | xFixed *stops,
|
---|
600 | xRenderColor *colors,
|
---|
601 | int *error);
|
---|
602 |
|
---|
603 | extern _X_EXPORT PicturePtr
|
---|
604 | CreateRadialGradientPicture (Picture pid,
|
---|
605 | xPointFixed *inner,
|
---|
606 | xPointFixed *outer,
|
---|
607 | xFixed innerRadius,
|
---|
608 | xFixed outerRadius,
|
---|
609 | int nStops,
|
---|
610 | xFixed *stops,
|
---|
611 | xRenderColor *colors,
|
---|
612 | int *error);
|
---|
613 |
|
---|
614 | extern _X_EXPORT PicturePtr
|
---|
615 | CreateConicalGradientPicture (Picture pid,
|
---|
616 | xPointFixed *center,
|
---|
617 | xFixed angle,
|
---|
618 | int nStops,
|
---|
619 | xFixed *stops,
|
---|
620 | xRenderColor *colors,
|
---|
621 | int *error);
|
---|
622 |
|
---|
623 | #ifdef PANORAMIX
|
---|
624 | extern _X_EXPORT void PanoramiXRenderInit (void);
|
---|
625 | extern _X_EXPORT void PanoramiXRenderReset (void);
|
---|
626 | #endif
|
---|
627 |
|
---|
628 | /*
|
---|
629 | * matrix.c
|
---|
630 | */
|
---|
631 |
|
---|
632 | extern _X_EXPORT void
|
---|
633 | PictTransform_from_xRenderTransform (PictTransformPtr pict,
|
---|
634 | xRenderTransform *render);
|
---|
635 |
|
---|
636 | extern _X_EXPORT void
|
---|
637 | xRenderTransform_from_PictTransform (xRenderTransform *render,
|
---|
638 | PictTransformPtr pict);
|
---|
639 |
|
---|
640 | extern _X_EXPORT Bool
|
---|
641 | PictureTransformPoint (PictTransformPtr transform,
|
---|
642 | PictVectorPtr vector);
|
---|
643 |
|
---|
644 | extern _X_EXPORT Bool
|
---|
645 | PictureTransformPoint3d (PictTransformPtr transform,
|
---|
646 | PictVectorPtr vector);
|
---|
647 |
|
---|
648 | #endif /* _PICTURESTR_H_ */
|
---|