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