18#define VERTEX(n) (pVertex + gt->n)
19#define COMPAREVERTEX(a, b) ((a)->x == (b)->x && (a)->y == (b)->y)
21#define VCMPCLR(a,b,c,color) (a->color != b->color || a->color != c->color)
22#define VCMPCLRS(a,b,c) \
23 !(!VCMPCLR(a,b,c,Red) || !VCMPCLR(a,b,c,Green) || !VCMPCLR(a,b,c,Blue))
26#define HVINITCOL(Col, id) \
27 c[id] = v1->Col >> 8; \
28 dc[id] = abs((v2->Col >> 8) - c[id]); \
29 ec[id] = -(dy >> 1); \
30 ic[id] = LINC[(v2->Col >> 8) > c[id]]
31#define HVSTEPCOL(id) \
56 RECTL rcGradient, rcSG;
88 if((
v1->Red !=
v2->Red ||
v1->Green !=
v2->Green ||
v1->Blue !=
v2->Blue) &&
dy > 1)
99 for (
i = 0;
i < RectEnum.c && RectEnum.arcl[
i].top <= rcSG.
bottom;
i++)
127 for (
i = 0;
i < RectEnum.c && RectEnum.arcl[
i].top <= rcSG.
bottom;
i++)
167 for (
i = 0;
i < RectEnum.c && RectEnum.arcl[
i].top <= rcSG.
bottom;
i++)
188#define S_FILLLINE(linefrom,lineto) \
189 if(sx[lineto] < sx[linefrom]) \
190 DibFunctionsForBitmapFormat[psoOutput->iBitmapFormat].DIB_HLine(psoOutput, max(sx[lineto], FillRect.left), min(sx[linefrom], FillRect.right), sy, Color); \
192 DibFunctionsForBitmapFormat[psoOutput->iBitmapFormat].DIB_HLine(psoOutput, max(sx[linefrom], FillRect.left), min(sx[lineto], FillRect.right), sy, Color);
194#define S_DOLINE(a,b,line) \
195 ex[line] += dx[line]; \
196 while(ex[line] > 0 && x[line] != destx[line]) \
198 x[line] += incx[line]; \
199 sx[line] += incx[line]; \
200 ex[line] -= dy[line]; \
203#define S_GOLINE(a,b,line) \
204 if(y >= a->y && y <= b->y) \
207#define S_ENDLINE(a,b,line) \
210#define S_INITLINE(a,b,line) \
212 sx[line] = a->x + pptlDitherOrg->x; \
213 dx[line] = abs(b->x - a->x); \
214 dy[line] = abs(b->y - a->y); \
215 incx[line] = LINC[b->x > a->x]; \
216 ex[line] = -(dy[line]>>1); \
220#define INITCOL(a,b,line,col,id) \
221 c[line][id] = a->col >> 8; \
222 dc[line][id] = abs((b->col >> 8) - c[line][id]); \
223 ec[line][id] = -(dy[line]>>1); \
224 ic[line][id] = LINC[(b->col >> 8) > c[line][id]]
226#define STEPCOL(a,b,line,col,id) \
227 ec[line][id] += dc[line][id]; \
228 while(ec[line][id] > 0) \
230 c[line][id] += ic[line][id]; \
231 ec[line][id] -= dy[line]; \
234#define FINITCOL(linefrom,lineto,colid) \
235 gc[colid] = c[linefrom][colid]; \
236 gd[colid] = abs(c[lineto][colid] - gc[colid]); \
237 ge[colid] = -(gx >> 1); \
238 gi[colid] = LINC[c[lineto][colid] > gc[colid]]
240#define FDOCOL(linefrom,lineto,colid) \
241 ge[colid] += gd[colid]; \
242 while(ge[colid] > 0) \
244 gc[colid] += gi[colid]; \
248#define FILLLINE(linefrom,lineto) \
249 gx = abs(sx[lineto] - sx[linefrom]); \
250 gxi = LINC[sx[linefrom] < sx[lineto]]; \
251 FINITCOL(linefrom, lineto, 0); \
252 FINITCOL(linefrom, lineto, 1); \
253 FINITCOL(linefrom, lineto, 2); \
254 for(g = sx[linefrom]; g != sx[lineto]; g += gxi) \
256 if(InY && g >= FillRect.left && g < FillRect.right) \
258 Color = XLATEOBJ_iXlate(pxlo, RGB(gc[0], gc[1], gc[2])); \
259 DibFunctionsForBitmapFormat[psoOutput->iBitmapFormat].DIB_PutPixel(psoOutput, g, sy, Color); \
261 FDOCOL(linefrom, lineto, 0); \
262 FDOCOL(linefrom, lineto, 1); \
263 FDOCOL(linefrom, lineto, 2); \
266#define DOLINE(a,b,line) \
267 STEPCOL(a, b, line, Red, 0); \
268 STEPCOL(a, b, line, Green, 1); \
269 STEPCOL(a, b, line, Blue, 2); \
270 ex[line] += dx[line]; \
271 while(ex[line] > 0 && x[line] != destx[line]) \
273 x[line] += incx[line]; \
274 sx[line] += incx[line]; \
275 ex[line] -= dy[line]; \
278#define GOLINE(a,b,line) \
279 if(y >= a->y && y <= b->y) \
282#define ENDLINE(a,b,line) \
285#define INITLINE(a,b,line) \
287 sx[line] = a->x + pptlDitherOrg->x; \
288 dx[line] = abs(b->x - a->x); \
289 dy[line] = max(abs(b->y - a->y),1); \
290 incx[line] = LINC[b->x > a->x]; \
291 ex[line] = -(dy[line]>>1); \
294#define DOINIT(a, b, line) \
295 INITLINE(a, b, line); \
296 INITCOL(a, b, line, Red, 0); \
297 INITCOL(a, b, line, Green, 1); \
298 INITCOL(a, b, line, Blue, 2);
300#define SMALLER(a,b) (a->y < b->y) || (a->y == b->y && a->x < b->x)
302#define SWAP(a,b,c) c = a;\
333 LONG g, gx, gxi, gc[3], gd[3], ge[3], gi[3];
357 DPRINT(
"Triangle: (%i,%i) (%i,%i) (%i,%i)\n",
v1->x,
v1->y,
v2->x,
v2->y,
v3->x,
v3->y);
359 DPRINT(
"FIXME: IntEngGradientFillTriangle is broken\n");
372 for (
i = 0;
i < RectEnum.c && RectEnum.arcl[
i].top <=
prclExtents->bottom;
i++)
420 for (
i = 0;
i < RectEnum.c && RectEnum.arcl[
i].top <=
prclExtents->bottom;
i++)
499 case GRADIENT_FILL_RECT_H:
500 case GRADIENT_FILL_RECT_V:
513 (
ulMode == GRADIENT_FILL_RECT_H)))
521 case GRADIENT_FILL_TRIANGLE:
BOOL APIENTRY IntEngEnter(PINTENG_ENTER_LEAVE EnterLeave, SURFOBJ *psoDest, RECTL *DestRect, BOOL ReadOnly, POINTL *Translate, SURFOBJ **ppsoOutput)
BOOL APIENTRY IntEngLeave(PINTENG_ENTER_LEAVE EnterLeave)
GLint GLint GLint GLint GLint x
GLint GLint GLint GLint GLint GLint y
GLfloat GLfloat GLfloat GLfloat v3
GLfloat GLfloat GLfloat v2
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
#define CONTAINING_RECORD(address, type, field)
DIB_FUNCTIONS DibFunctionsForBitmapFormat[]
#define S_DOLINE(a, b, line)
#define S_ENDLINE(a, b, line)
static BOOL IntEngIsNULLTriangle(TRIVERTEX *pVertex, GRADIENT_TRIANGLE *gt)
#define ENDLINE(a, b, line)
#define S_INITLINE(a, b, line)
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)
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)
#define DOLINE(a, b, line)
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)
#define S_FILLLINE(linefrom, lineto)
#define HVINITCOL(Col, id)
#define S_GOLINE(a, b, line)
#define GOLINE(a, b, line)
#define COMPAREVERTEX(a, b)
#define DOINIT(a, b, line)
#define FILLLINE(linefrom, lineto)
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)
#define VCMPCLRS(a, b, c)
#define GDIDEVFUNCS(SurfObj)
BOOL FASTCALL RECTL_bIntersectRect(_Out_ RECTL *prclDst, _In_ const RECTL *prcl1, _In_ const RECTL *prcl2)
FORCEINLINE VOID RECTL_vOffsetRect(_Inout_ RECTL *prcl, _In_ INT cx, _In_ INT cy)
_In_ CLIPOBJ _In_opt_ XLATEOBJ _In_ TRIVERTEX _In_ ULONG _In_ PVOID pMesh
ENGAPI ULONG APIENTRY XLATEOBJ_iXlate(_In_ XLATEOBJ *pxlo, _In_ ULONG iColor)
ENGAPI BOOL APIENTRY CLIPOBJ_bEnum(_In_ CLIPOBJ *pco, _In_ ULONG cj, _Out_bytecap_(cj) ULONG *pul)
_In_ CLIPOBJ _In_opt_ XLATEOBJ _In_ TRIVERTEX _In_ ULONG _In_ PVOID _In_ ULONG _In_ RECTL _In_ POINTL * pptlDitherOrg
_In_ CLIPOBJ _In_opt_ XLATEOBJ _In_ TRIVERTEX _In_ ULONG nVertex
_In_ SURFOBJ _In_ CLIPOBJ _In_opt_ XLATEOBJ * pxlo
#define HOOK_GRADIENTFILL
ENGAPI ULONG APIENTRY CLIPOBJ_cEnumStart(_Inout_ CLIPOBJ *pco, _In_ BOOL bAll, _In_ ULONG iType, _In_ ULONG iDirection, _In_ ULONG cLimit)
_In_ CLIPOBJ _In_opt_ XLATEOBJ _In_ TRIVERTEX _In_ ULONG _In_ PVOID _In_ ULONG _In_ RECTL * prclExtents
_In_ CLIPOBJ _In_opt_ XLATEOBJ _In_ TRIVERTEX _In_ ULONG _In_ PVOID _In_ ULONG _In_ RECTL _In_ POINTL _In_ ULONG ulMode
_In_ CLIPOBJ _In_opt_ XLATEOBJ _In_ TRIVERTEX * pVertex
_In_ CLIPOBJ _In_opt_ XLATEOBJ _In_ TRIVERTEX _In_ ULONG _In_ PVOID _In_ ULONG nMesh
_In_ SURFOBJ _In_ CLIPOBJ * pco
struct _GRADIENT_RECT * PGRADIENT_RECT
struct _GRADIENT_TRIANGLE * PGRADIENT_TRIANGLE
int WINAPI FillRect(HDC, LPCRECT, HBRUSH)