ReactOS 0.4.16-dev-1946-g52006dd
gradient.c
Go to the documentation of this file.
1/*
2 * COPYRIGHT: See COPYING in the top level directory
3 * PROJECT: ReactOS kernel
4 * PURPOSE: GDI Driver Gradient Functions
5 * FILE: win32ss/gdi/eng/gradient.c
6 * PROGRAMER: Thomas Weidenmueller
7 */
8
9#include <win32k.h>
10
11#define NDEBUG
12#include <debug.h>
13
14/* MACROS *********************************************************************/
15
16const LONG LINC[2] = {-1, 1};
17
18#define VERTEX(n) (pVertex + gt->n)
19#define COMPAREVERTEX(a, b) ((a)->x == (b)->x && (a)->y == (b)->y)
20
21/* Check if all three vectors have the same color, either R, G, or B */
22#define VCMPCLR(a, b, c, color) (a->color == b->color && a->color == c->color)
23/* Check if all three vectors have the same colors for R, G, and B, then
24 * NOT the result because we want to check for not using solid color logic */
25#define VCMPCLRS(a, b, c) \
26 !(VCMPCLR(a, b, c, Red) && VCMPCLR(a, b, c, Green) && VCMPCLR(a, b, c, Blue))
27
28/* Horizontal/Vertical gradients */
29#define HVINITCOL(Col, id) \
30 c[id] = v1->Col >> 8; \
31 dc[id] = abs((v2->Col >> 8) - c[id]); \
32 ec[id] = -(dy >> 1); \
33 ic[id] = LINC[(v2->Col >> 8) > c[id]]
34#define HVSTEPCOL(id) \
35 ec[id] += dc[id]; \
36 while(ec[id] > 0) \
37 { \
38 c[id] += ic[id]; \
39 ec[id] -= dy; \
40 }
41
42/* FUNCTIONS ******************************************************************/
43
44BOOL
47 IN SURFOBJ *psoDest,
48 IN CLIPOBJ *pco,
52 IN PGRADIENT_RECT gRect,
55 IN BOOL Horizontal)
56{
57 SURFOBJ *psoOutput;
58 TRIVERTEX *v1, *v2;
59 RECTL rcGradient, rcSG;
60 RECT_ENUM RectEnum;
61 BOOL EnumMore;
62 ULONG i;
63 POINTL Translate;
64 INTENG_ENTER_LEAVE EnterLeave;
65 LONG y, dy, c[3], dc[3], ec[3], ic[3];
66
67 v1 = (pVertex + gRect->UpperLeft);
68 v2 = (pVertex + gRect->LowerRight);
69
70 rcGradient.left = min(v1->x, v2->x);
71 rcGradient.right = max(v1->x, v2->x);
72 rcGradient.top = min(v1->y, v2->y);
73 rcGradient.bottom = max(v1->y, v2->y);
74 rcSG = rcGradient;
76
77 if(Horizontal)
78 {
79 dy = abs(rcGradient.right - rcGradient.left);
80 }
81 else
82 {
83 dy = abs(rcGradient.bottom - rcGradient.top);
84 }
85
86 if(!IntEngEnter(&EnterLeave, psoDest, &rcSG, FALSE, &Translate, &psoOutput))
87 {
88 return FALSE;
89 }
90
91 if((v1->Red != v2->Red || v1->Green != v2->Green || v1->Blue != v2->Blue) && dy > 1)
92 {
94 do
95 {
98
99 if (Horizontal)
100 {
101 EnumMore = CLIPOBJ_bEnum(pco, (ULONG) sizeof(RectEnum), (PVOID) &RectEnum);
102 for (i = 0; i < RectEnum.c && RectEnum.arcl[i].top <= rcSG.bottom; i++)
103 {
104 if (RECTL_bIntersectRect(&FillRect, &RectEnum.arcl[i], &rcSG))
105 {
106 HVINITCOL(Red, 0);
107 HVINITCOL(Green, 1);
108 HVINITCOL(Blue, 2);
109
110 for (y = rcSG.left; y < FillRect.right; y++)
111 {
112 if (y >= FillRect.left)
113 {
114 Color = XLATEOBJ_iXlate(pxlo, RGB(c[0], c[1], c[2]));
116 psoOutput, y + Translate.x, FillRect.top + Translate.y, FillRect.bottom + Translate.y, Color);
117 }
118 HVSTEPCOL(0);
119 HVSTEPCOL(1);
120 HVSTEPCOL(2);
121 }
122 }
123 }
124
125 continue;
126 }
127
128 /* vertical */
129 EnumMore = CLIPOBJ_bEnum(pco, (ULONG) sizeof(RectEnum), (PVOID) &RectEnum);
130 for (i = 0; i < RectEnum.c && RectEnum.arcl[i].top <= rcSG.bottom; i++)
131 {
132 if (RECTL_bIntersectRect(&FillRect, &RectEnum.arcl[i], &rcSG))
133 {
134 HVINITCOL(Red, 0);
135 HVINITCOL(Green, 1);
136 HVINITCOL(Blue, 2);
137
138 for (y = rcSG.top; y < FillRect.bottom; y++)
139 {
140 if (y >= FillRect.top)
141 {
142 Color = XLATEOBJ_iXlate(pxlo, RGB(c[0], c[1], c[2]));
144 FillRect.left + Translate.x,
145 FillRect.right + Translate.x,
146 y + Translate.y,
147 Color);
148 }
149 HVSTEPCOL(0);
150 HVSTEPCOL(1);
151 HVSTEPCOL(2);
152 }
153 }
154 }
155
156 }
157 while (EnumMore);
158
159 return IntEngLeave(&EnterLeave);
160 }
161
162 /* rectangle has only one color, no calculation required */
164 do
165 {
167 ULONG Color = XLATEOBJ_iXlate(pxlo, RGB(v1->Red >> 8, v1->Green >> 8, v1->Blue >> 8));
168
169 EnumMore = CLIPOBJ_bEnum(pco, (ULONG) sizeof(RectEnum), (PVOID) &RectEnum);
170 for (i = 0; i < RectEnum.c && RectEnum.arcl[i].top <= rcSG.bottom; i++)
171 {
172 if (RECTL_bIntersectRect(&FillRect, &RectEnum.arcl[i], &rcSG))
173 {
174 for (; FillRect.top < FillRect.bottom; FillRect.top++)
175 {
177 FillRect.left + Translate.x,
178 FillRect.right + Translate.x,
179 FillRect.top + Translate.y,
180 Color);
181 }
182 }
183 }
184 }
185 while (EnumMore);
186
187 return IntEngLeave(&EnterLeave);
188}
189
190/* Fill triangle with solid color */
191#define S_FILLLINE(linefrom,lineto) \
192 if(sx[lineto] < sx[linefrom]) \
193 DibFunctionsForBitmapFormat[psoOutput->iBitmapFormat].DIB_HLine(psoOutput, max(sx[lineto], FillRect.left), min(sx[linefrom], FillRect.right), sy, Color); \
194 else \
195 DibFunctionsForBitmapFormat[psoOutput->iBitmapFormat].DIB_HLine(psoOutput, max(sx[linefrom], FillRect.left), min(sx[lineto], FillRect.right), sy, Color);
196
197#define S_DOLINE(a,b,line) \
198 ex[line] += dx[line]; \
199 while(ex[line] > 0 && x[line] != destx[line]) \
200 { \
201 x[line] += incx[line]; \
202 sx[line] += incx[line]; \
203 ex[line] -= dy[line]; \
204 }
205
206#define S_GOLINE(a,b,line) \
207 if(y >= a->y && y <= b->y) \
208 {
209
210#define S_ENDLINE(a,b,line) \
211 }
212
213#define S_INITLINE(a,b,line) \
214 x[line] = a->x; \
215 sx[line] = a->x + pptlDitherOrg->x; \
216 dx[line] = abs(b->x - a->x); \
217 dy[line] = abs(b->y - a->y); \
218 incx[line] = LINC[b->x > a->x]; \
219 ex[line] = -(dy[line]>>1); \
220 destx[line] = b->x
221
222/* Fill triangle with gradient */
223#define INITCOL(a,b,line,col,id) \
224 c[line][id] = a->col >> 8; \
225 dc[line][id] = abs((b->col >> 8) - c[line][id]); \
226 ec[line][id] = -(dy[line]>>1); \
227 ic[line][id] = LINC[(b->col >> 8) > c[line][id]]
228
229#define STEPCOL(a,b,line,col,id) \
230 ec[line][id] += dc[line][id]; \
231 if(dy[line] != 0) \
232 while(ec[line][id] > 0) \
233 { \
234 c[line][id] += ic[line][id]; \
235 ec[line][id] -= dy[line]; \
236 }
237
238#define FINITCOL(linefrom,lineto,colid) \
239 gc[colid] = c[linefrom][colid]; \
240 gd[colid] = abs(c[lineto][colid] - gc[colid]); \
241 ge[colid] = -(gx >> 1); \
242 gi[colid] = LINC[c[lineto][colid] > gc[colid]]
243
244#define FDOCOL(linefrom,lineto,colid) \
245 ge[colid] += gd[colid]; \
246 if (gx != 0) \
247 while(ge[colid] > 0) \
248 { \
249 gc[colid] += gi[colid]; \
250 ge[colid] -= gx; \
251 }
252
253#define FILLLINE(linefrom,lineto) \
254 gx = abs(sx[lineto] - sx[linefrom]); \
255 gxi = LINC[sx[linefrom] < sx[lineto]]; \
256 FINITCOL(linefrom, lineto, 0); \
257 FINITCOL(linefrom, lineto, 1); \
258 FINITCOL(linefrom, lineto, 2); \
259 g_end = sx[lineto] + gxi; \
260 for(g = sx[linefrom]; g != g_end; g += gxi) \
261 { \
262 if(InY && g >= FillRect.left && g < FillRect.right) \
263 { \
264 Color = XLATEOBJ_iXlate(pxlo, RGB(gc[0], gc[1], gc[2])); \
265 DibFunctionsForBitmapFormat[psoOutput->iBitmapFormat].DIB_PutPixel(psoOutput, g, sy, Color); \
266 } \
267 FDOCOL(linefrom, lineto, 0); \
268 FDOCOL(linefrom, lineto, 1); \
269 FDOCOL(linefrom, lineto, 2); \
270 }
271
272#define DOLINE(a,b,line) \
273 STEPCOL(a, b, line, Red, 0); \
274 STEPCOL(a, b, line, Green, 1); \
275 STEPCOL(a, b, line, Blue, 2); \
276 ex[line] += dx[line]; \
277 while(ex[line] > 0 && x[line] != destx[line]) \
278 { \
279 x[line] += incx[line]; \
280 sx[line] += incx[line]; \
281 ex[line] -= dy[line]; \
282 }
283
284#define GOLINE(a,b,line) \
285 if(y >= a->y && y <= b->y) \
286 {
287
288#define ENDLINE(a,b,line) \
289 }
290
291#define INITLINE(a,b,line) \
292 x[line] = a->x; \
293 sx[line] = a->x + pptlDitherOrg->x - 1; \
294 dx[line] = abs(b->x - a->x); \
295 dy[line] = abs(b->y - a->y); \
296 incx[line] = LINC[b->x > a->x]; \
297 ex[line] = -(dy[line]>>1); \
298 destx[line] = b->x
299
300#define DOINIT(a, b, line) \
301 INITLINE(a, b, line); \
302 INITCOL(a, b, line, Red, 0); \
303 INITCOL(a, b, line, Green, 1); \
304 INITCOL(a, b, line, Blue, 2);
305
306#define SMALLER(a,b) (a->y < b->y) || (a->y == b->y && a->x < b->x)
307
308#define SWAP(a,b,c) c = a;\
309 a = b;\
310 b = c
311
312#define NLINES 3
313
314BOOL
317 IN SURFOBJ *psoDest,
318 IN CLIPOBJ *pco,
322 IN PGRADIENT_TRIANGLE gTriangle,
325{
326 SURFOBJ *psoOutput;
327 PTRIVERTEX v1, v2, v3;
328 RECT_ENUM RectEnum;
329 BOOL EnumMore;
330 ULONG i;
331 POINTL Translate;
332 INTENG_ENTER_LEAVE EnterLeave;
333 RECTL FillRect = { 0, 0, 0, 0 };
334 ULONG Color;
335
336 BOOL sx[NLINES];
337 LONG x[NLINES], dx[NLINES], dy[NLINES], incx[NLINES], ex[NLINES], destx[NLINES];
338 LONG c[NLINES][3], dc[NLINES][3], ec[NLINES][3], ic[NLINES][3]; /* colors on lines */
339 LONG g, gx, gxi, gc[3], gd[3], ge[3], gi[3]; /* colors in triangle */
340 LONG sy, y, bt, g_end;
341
342 v1 = (pVertex + gTriangle->Vertex1);
343 v2 = (pVertex + gTriangle->Vertex2);
344 v3 = (pVertex + gTriangle->Vertex3);
345
346 /* bubble sort */
347 if (SMALLER(v2, v1))
348 {
349 TRIVERTEX *t;
350 SWAP(v1, v2, t);
351 }
352
353 if (SMALLER(v3, v2))
354 {
355 TRIVERTEX *t;
356 SWAP(v2, v3, t);
357 if (SMALLER(v2, v1))
358 {
359 SWAP(v1, v2, t);
360 }
361 }
362
363 DPRINT("Triangle: (%i,%i) (%i,%i) (%i,%i)\n", v1->x, v1->y, v2->x, v2->y, v3->x, v3->y);
364
365 if (!IntEngEnter(&EnterLeave, psoDest, &FillRect, FALSE, &Translate, &psoOutput))
366 {
367 return FALSE;
368 }
369
370 if (VCMPCLRS(v1, v2, v3))
371 {
373 do
374 {
375 EnumMore = CLIPOBJ_bEnum(pco, (ULONG) sizeof(RectEnum), (PVOID) &RectEnum);
376 for (i = 0; i < RectEnum.c && RectEnum.arcl[i].top <= prclExtents->bottom; i++)
377 {
378 if (RECTL_bIntersectRect(&FillRect, &RectEnum.arcl[i], prclExtents))
379 {
380 BOOL InY;
381
382 DOINIT(v1, v3, 0);
383 DOINIT(v1, v2, 1);
384 DOINIT(v2, v3, 2);
385
386 y = v1->y;
387 sy = v1->y + pptlDitherOrg->y;
388 bt = min(v3->y + pptlDitherOrg->y, FillRect.bottom);
389
390 while (sy < bt)
391 {
392 InY = !(sy < FillRect.top || sy >= FillRect.bottom);
393 GOLINE(v1, v3, 0);
394 DOLINE(v1, v3, 0);
395 ENDLINE(v1, v3, 0);
396
397 GOLINE(v1, v2, 1);
398 DOLINE(v1, v2, 1);
399 FILLLINE(0, 1);
400 ENDLINE(v1, v2, 1);
401
402 GOLINE(v2, v3, 2);
403 FILLLINE(0, 2);
404 DOLINE(v2, v3, 2);
405 FILLLINE(0, 2);
406 ENDLINE(23, v3, 2);
407
408 y++;
409 sy++;
410 }
411 }
412 }
413 } while (EnumMore);
414
415 return IntEngLeave(&EnterLeave);
416 }
417
418 /* fill triangle with one solid color */
419
420 Color = XLATEOBJ_iXlate(pxlo, RGB(v1->Red >> 8, v1->Green >> 8, v1->Blue >> 8));
422 do
423 {
424 EnumMore = CLIPOBJ_bEnum(pco, (ULONG) sizeof(RectEnum), (PVOID) &RectEnum);
425 for (i = 0; i < RectEnum.c && RectEnum.arcl[i].top <= prclExtents->bottom; i++)
426 {
427 if (RECTL_bIntersectRect(&FillRect, &RectEnum.arcl[i], prclExtents))
428 {
429 S_INITLINE(v1, v3, 0);
430 S_INITLINE(v1, v2, 1);
431 S_INITLINE(v2, v3, 2);
432
433 y = v1->y;
434 sy = v1->y + pptlDitherOrg->y;
435 bt = min(v3->y + pptlDitherOrg->y, FillRect.bottom);
436
437 while (sy < bt)
438 {
439 S_GOLINE(v1, v3, 0);
440 S_DOLINE(v1, v3, 0);
441 S_ENDLINE(v1, v3, 0);
442
443 S_GOLINE(v1, v2, 1);
444 S_DOLINE(v1, v2, 1);
445 S_FILLLINE(0, 1);
446 S_ENDLINE(v1, v2, 1);
447
448 S_GOLINE(v2, v3, 2);
449 S_DOLINE(v2, v3, 2);
450 S_FILLLINE(0, 2);
451 S_ENDLINE(23, v3, 2);
452
453 y++;
454 sy++;
455 }
456 }
457 }
458 } while (EnumMore);
459
460 return IntEngLeave(&EnterLeave);
461}
462
463
464static
465BOOL
467{
468 if(COMPAREVERTEX(VERTEX(Vertex1), VERTEX(Vertex2)))
469 return TRUE;
470 if(COMPAREVERTEX(VERTEX(Vertex1), VERTEX(Vertex3)))
471 return TRUE;
472 if(COMPAREVERTEX(VERTEX(Vertex2), VERTEX(Vertex3)))
473 return TRUE;
474 return FALSE;
475}
476
477
478BOOL
481 _Inout_ SURFOBJ *psoDest,
491{
492 ULONG i;
493 BOOL ret = FALSE;
494
495 /* Check for NULL clip object */
496 if (pco == NULL)
497 {
498 /* Use the trivial one instead */
499 pco = (CLIPOBJ *)&gxcoTrivial;//.coClient;
500 }
501
502 switch(ulMode)
503 {
504 case GRADIENT_FILL_RECT_H:
505 case GRADIENT_FILL_RECT_V:
506 {
508 for (i = 0; i < nMesh; i++, gr++)
509 {
510 if (!IntEngGradientFillRect(psoDest,
511 pco,
512 pxlo,
513 pVertex,
514 nVertex,
515 gr,
518 (ulMode == GRADIENT_FILL_RECT_H)))
519 {
520 break;
521 }
522 }
523 ret = TRUE;
524 break;
525 }
526 case GRADIENT_FILL_TRIANGLE:
527 {
529 for (i = 0; i < nMesh; i++, gt++)
530 {
532 {
533 /* skip empty triangles */
534 continue;
535 }
536 if (!IntEngGradientFillTriangle(psoDest,
537 pco,
538 pxlo,
539 pVertex,
540 nVertex,
541 gt,
544 {
545 break;
546 }
547 }
548 ret = TRUE;
549 break;
550 }
551 }
552
553 return ret;
554}
555
556BOOL
559 IN SURFOBJ *psoDest,
560 IN CLIPOBJ *pco,
564 IN PVOID pMesh,
565 IN ULONG nMesh,
569{
570 BOOL Ret;
571 SURFACE *psurf;
572 ASSERT(psoDest);
573
574 psurf = CONTAINING_RECORD(psoDest, SURFACE, SurfObj);
575 ASSERT(psurf);
576
577 if (psurf->flags & HOOK_GRADIENTFILL)
578 {
579 Ret = GDIDEVFUNCS(psoDest).GradientFill(psoDest,
580 pco,
581 pxlo,
582 pVertex,
583 nVertex,
584 pMesh,
585 nMesh,
588 ulMode);
589 }
590 else
591 {
592 Ret = EngGradientFill(psoDest,
593 pco,
594 pxlo,
595 pVertex,
596 nVertex,
597 pMesh,
598 nMesh,
601 ulMode);
602 }
603
604 return Ret;
605}
@ Green
Definition: bl.h:199
@ Red
Definition: bl.h:201
@ Blue
Definition: bl.h:198
HDC dc
Definition: cylfrac.c:34
#define NULL
Definition: types.h:112
#define TRUE
Definition: types.h:120
#define FALSE
Definition: types.h:117
#define APIENTRY
Definition: api.h:79
#define RGB(r, g, b)
Definition: precomp.h:71
return ret
Definition: mutex.c:146
BOOL APIENTRY IntEngEnter(PINTENG_ENTER_LEAVE EnterLeave, SURFOBJ *psoDest, RECTL *DestRect, BOOL ReadOnly, POINTL *Translate, SURFOBJ **ppsoOutput)
Definition: engmisc.c:15
BOOL APIENTRY IntEngLeave(PINTENG_ENTER_LEAVE EnterLeave)
Definition: engmisc.c:162
#define abs(i)
Definition: fconv.c:206
unsigned int BOOL
Definition: ntddk_ex.h:94
GLint GLint GLint GLint GLint x
Definition: gl.h:1548
GLint GLint GLint GLint GLint GLint y
Definition: gl.h:1548
GLdouble GLdouble t
Definition: gl.h:2047
const GLubyte * c
Definition: glext.h:8905
GLboolean GLboolean g
Definition: glext.h:6204
GLfloat GLfloat GLfloat GLfloat v3
Definition: glext.h:6064
GLfloat GLfloat v1
Definition: glext.h:6062
GLfloat GLfloat GLfloat v2
Definition: glext.h:6063
GLsizei GLenum const GLvoid GLsizei GLenum GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLint GLint GLint GLshort GLshort GLshort GLubyte GLubyte GLubyte GLuint GLuint GLuint GLushort GLushort GLushort GLbyte GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLfloat GLint GLint GLint GLint GLshort GLshort GLshort GLshort GLubyte GLubyte GLubyte GLubyte GLuint GLuint GLuint GLuint GLushort GLushort GLushort GLushort GLboolean const GLdouble const GLfloat const GLint const GLshort const GLbyte const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLdouble const GLfloat const GLfloat const GLint const GLint const GLshort const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort GLenum GLenum GLenum GLfloat GLenum GLint GLenum GLenum GLenum GLfloat GLenum GLenum GLint GLenum GLfloat GLenum GLint GLint GLushort GLenum GLenum GLfloat GLenum GLenum GLint GLfloat const GLubyte GLenum GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLint GLint GLsizei GLsizei GLint GLenum GLenum const GLvoid GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLenum const GLdouble GLenum GLenum const GLfloat GLenum GLenum const GLint GLsizei GLuint GLfloat GLuint GLbitfield GLfloat GLint GLuint GLboolean GLenum GLfloat GLenum GLbitfield GLenum GLfloat GLfloat GLint GLint const GLfloat GLenum GLfloat GLfloat GLint GLint GLfloat GLfloat GLint GLint const GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat const GLdouble const GLfloat const GLdouble const GLfloat GLint i
Definition: glfuncs.h:248
GLint dy
Definition: linetemp.h:97
GLint dx
Definition: linetemp.h:97
#define ASSERT(a)
Definition: mode.c:44
#define min(a, b)
Definition: monoChain.cc:55
#define _Inout_
Definition: no_sal2.h:162
#define _In_
Definition: no_sal2.h:158
#define _In_opt_
Definition: no_sal2.h:212
#define FASTCALL
Definition: nt_native.h:50
long LONG
Definition: pedump.c:60
#define DPRINT
Definition: sndvol32.h:73
PFN_DIB_HLine DIB_HLine
Definition: dib.h:47
PFN_DIB_VLine DIB_VLine
Definition: dib.h:48
long bottom
Definition: polytest.cpp:53
long right
Definition: polytest.cpp:53
long top
Definition: polytest.cpp:53
long left
Definition: polytest.cpp:53
LONG y
Definition: windef.h:124
LONG x
Definition: windef.h:123
FLONG flags
Definition: surface.h:10
ULONG iBitmapFormat
Definition: winddi.h:1215
Definition: comerr.c:44
#define max(a, b)
Definition: svc.c:63
#define IN
Definition: typedefs.h:39
#define CONTAINING_RECORD(address, type, field)
Definition: typedefs.h:260
uint32_t ULONG
Definition: typedefs.h:59
DIB_FUNCTIONS DibFunctionsForBitmapFormat[]
Definition: dib.c:20
XCLIPOBJ gxcoTrivial
Definition: bitblt.c:20
#define VERTEX(n)
Definition: gradient.c:18
#define S_DOLINE(a, b, line)
Definition: gradient.c:197
#define SMALLER(a, b)
Definition: gradient.c:306
#define S_ENDLINE(a, b, line)
Definition: gradient.c:210
static BOOL IntEngIsNULLTriangle(TRIVERTEX *pVertex, GRADIENT_TRIANGLE *gt)
Definition: gradient.c:466
#define ENDLINE(a, b, line)
Definition: gradient.c:288
#define SWAP(a, b, c)
Definition: gradient.c:308
#define S_INITLINE(a, b, line)
Definition: gradient.c:213
#define NLINES
Definition: gradient.c:312
BOOL FASTCALL IntEngGradientFillRect(IN SURFOBJ *psoDest, IN CLIPOBJ *pco, IN XLATEOBJ *pxlo, IN TRIVERTEX *pVertex, IN ULONG nVertex, IN PGRADIENT_RECT gRect, IN RECTL *prclExtents, IN POINTL *pptlDitherOrg, IN BOOL Horizontal)
Definition: gradient.c:46
BOOL APIENTRY IntEngGradientFill(IN SURFOBJ *psoDest, IN CLIPOBJ *pco, IN XLATEOBJ *pxlo, IN TRIVERTEX *pVertex, IN ULONG nVertex, IN PVOID pMesh, IN ULONG nMesh, IN RECTL *prclExtents, IN POINTL *pptlDitherOrg, IN ULONG ulMode)
Definition: gradient.c:558
#define DOLINE(a, b, line)
Definition: gradient.c:272
BOOL APIENTRY EngGradientFill(_Inout_ SURFOBJ *psoDest, _In_ CLIPOBJ *pco, _In_opt_ XLATEOBJ *pxlo, _In_ TRIVERTEX *pVertex, _In_ ULONG nVertex, _In_ PVOID pMesh, _In_ ULONG nMesh, _In_ RECTL *prclExtents, _In_ POINTL *pptlDitherOrg, _In_ ULONG ulMode)
Definition: gradient.c:480
#define S_FILLLINE(linefrom, lineto)
Definition: gradient.c:191
const LONG LINC[2]
Definition: gradient.c:16
#define HVINITCOL(Col, id)
Definition: gradient.c:29
#define HVSTEPCOL(id)
Definition: gradient.c:34
#define S_GOLINE(a, b, line)
Definition: gradient.c:206
#define GOLINE(a, b, line)
Definition: gradient.c:284
#define COMPAREVERTEX(a, b)
Definition: gradient.c:19
#define DOINIT(a, b, line)
Definition: gradient.c:300
#define FILLLINE(linefrom, lineto)
Definition: gradient.c:253
BOOL FASTCALL IntEngGradientFillTriangle(IN SURFOBJ *psoDest, IN CLIPOBJ *pco, IN XLATEOBJ *pxlo, IN TRIVERTEX *pVertex, IN ULONG nVertex, IN PGRADIENT_TRIANGLE gTriangle, IN RECTL *prclExtents, IN POINTL *pptlDitherOrg)
Definition: gradient.c:316
#define VCMPCLRS(a, b, c)
Definition: gradient.c:25
#define GDIDEVFUNCS(SurfObj)
Definition: surface.h:106
BOOL FASTCALL RECTL_bIntersectRect(_Out_ RECTL *prclDst, _In_ const RECTL *prcl1, _In_ const RECTL *prcl2)
Definition: rect.c:55
FORCEINLINE VOID RECTL_vOffsetRect(_Inout_ RECTL *prcl, _In_ INT cx, _In_ INT cy)
Definition: rect.h:31
_In_ CLIPOBJ _In_opt_ XLATEOBJ _In_ TRIVERTEX _In_ ULONG _In_ PVOID pMesh
Definition: winddi.h:3653
#define CT_RECTANGLES
Definition: winddi.h:1317
ENGAPI ULONG APIENTRY XLATEOBJ_iXlate(_In_ XLATEOBJ *pxlo, _In_ ULONG iColor)
Definition: xlateobj.c:664
ENGAPI BOOL APIENTRY CLIPOBJ_bEnum(_In_ CLIPOBJ *pco, _In_ ULONG cj, _Out_bytecap_(cj) ULONG *pul)
Definition: clip.c:319
_In_ CLIPOBJ _In_opt_ XLATEOBJ _In_ TRIVERTEX _In_ ULONG _In_ PVOID _In_ ULONG _In_ RECTL _In_ POINTL * pptlDitherOrg
Definition: winddi.h:3656
_In_ CLIPOBJ _In_opt_ XLATEOBJ _In_ TRIVERTEX _In_ ULONG nVertex
Definition: winddi.h:3652
_In_ SURFOBJ _In_ CLIPOBJ _In_opt_ XLATEOBJ * pxlo
Definition: winddi.h:3416
#define HOOK_GRADIENTFILL
Definition: winddi.h:1436
ENGAPI ULONG APIENTRY CLIPOBJ_cEnumStart(_Inout_ CLIPOBJ *pco, _In_ BOOL bAll, _In_ ULONG iType, _In_ ULONG iDirection, _In_ ULONG cLimit)
Definition: clip.c:255
#define CD_RIGHTDOWN
Definition: winddi.h:1320
_In_ CLIPOBJ _In_opt_ XLATEOBJ _In_ TRIVERTEX _In_ ULONG _In_ PVOID _In_ ULONG _In_ RECTL * prclExtents
Definition: winddi.h:3655
_In_ CLIPOBJ _In_opt_ XLATEOBJ _In_ TRIVERTEX _In_ ULONG _In_ PVOID _In_ ULONG _In_ RECTL _In_ POINTL _In_ ULONG ulMode
Definition: winddi.h:3657
_In_ CLIPOBJ _In_opt_ XLATEOBJ _In_ TRIVERTEX * pVertex
Definition: winddi.h:3651
_In_ CLIPOBJ _In_opt_ XLATEOBJ _In_ TRIVERTEX _In_ ULONG _In_ PVOID _In_ ULONG nMesh
Definition: winddi.h:3654
_In_ SURFOBJ _In_ CLIPOBJ * pco
Definition: winddi.h:3415
struct _GRADIENT_RECT * PGRADIENT_RECT
struct _GRADIENT_TRIANGLE * PGRADIENT_TRIANGLE
int WINAPI FillRect(HDC, LPCRECT, HBRUSH)