Author: tkreuzer
Date: Thu May 1 09:48:40 2014
New Revision: 63090
URL:
http://svn.reactos.org/svn/reactos?rev=63090&view=rev
Log:
[FORMATTING]
Fix indentation, no code change
Modified:
trunk/reactos/win32ss/gdi/eng/gradient.c
trunk/reactos/win32ss/gdi/eng/perfcnt.c
trunk/reactos/win32ss/gdi/eng/semaphor.c
trunk/reactos/win32ss/gdi/eng/sort.c
trunk/reactos/win32ss/gdi/eng/string.c
trunk/reactos/win32ss/gdi/eng/stubs.c
trunk/reactos/win32ss/gdi/eng/transblt.c
Modified: trunk/reactos/win32ss/gdi/eng/gradient.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/win32ss/gdi/eng/gradient.c…
==============================================================================
--- trunk/reactos/win32ss/gdi/eng/gradient.c [iso-8859-1] (original)
+++ trunk/reactos/win32ss/gdi/eng/gradient.c [iso-8859-1] Thu May 1 09:48:40 2014
@@ -38,7 +38,8 @@
/* FUNCTIONS ******************************************************************/
-BOOL FASTCALL
+BOOL
+FASTCALL
IntEngGradientFillRect(
IN SURFOBJ *psoDest,
IN CLIPOBJ *pco,
@@ -50,129 +51,137 @@
IN POINTL *pptlDitherOrg,
IN BOOL Horizontal)
{
- SURFOBJ *psoOutput;
- TRIVERTEX *v1, *v2;
- RECTL rcGradient, rcSG;
- RECT_ENUM RectEnum;
- BOOL EnumMore;
- ULONG i;
- POINTL Translate;
- INTENG_ENTER_LEAVE EnterLeave;
- LONG y, dy, c[3], dc[3], ec[3], ic[3];
-
- v1 = (pVertex + gRect->UpperLeft);
- v2 = (pVertex + gRect->LowerRight);
-
- rcGradient.left = min(v1->x, v2->x);
- rcGradient.right = max(v1->x, v2->x);
- rcGradient.top = min(v1->y, v2->y);
- rcGradient.bottom = max(v1->y, v2->y);
- rcSG = rcGradient;
- RECTL_vOffsetRect(&rcSG, pptlDitherOrg->x, pptlDitherOrg->y);
-
- if(Horizontal)
- {
- dy = abs(rcGradient.right - rcGradient.left);
- }
- else
- {
- dy = abs(rcGradient.bottom - rcGradient.top);
- }
-
- if(!IntEngEnter(&EnterLeave, psoDest, &rcSG, FALSE, &Translate,
&psoOutput))
- {
- return FALSE;
- }
-
- if((v1->Red != v2->Red || v1->Green != v2->Green || v1->Blue !=
v2->Blue) && dy > 1)
- {
+ SURFOBJ *psoOutput;
+ TRIVERTEX *v1, *v2;
+ RECTL rcGradient, rcSG;
+ RECT_ENUM RectEnum;
+ BOOL EnumMore;
+ ULONG i;
+ POINTL Translate;
+ INTENG_ENTER_LEAVE EnterLeave;
+ LONG y, dy, c[3], dc[3], ec[3], ic[3];
+
+ v1 = (pVertex + gRect->UpperLeft);
+ v2 = (pVertex + gRect->LowerRight);
+
+ rcGradient.left = min(v1->x, v2->x);
+ rcGradient.right = max(v1->x, v2->x);
+ rcGradient.top = min(v1->y, v2->y);
+ rcGradient.bottom = max(v1->y, v2->y);
+ rcSG = rcGradient;
+ RECTL_vOffsetRect(&rcSG, pptlDitherOrg->x, pptlDitherOrg->y);
+
+ if(Horizontal)
+ {
+ dy = abs(rcGradient.right - rcGradient.left);
+ }
+ else
+ {
+ dy = abs(rcGradient.bottom - rcGradient.top);
+ }
+
+ if(!IntEngEnter(&EnterLeave, psoDest, &rcSG, FALSE, &Translate,
&psoOutput))
+ {
+ return FALSE;
+ }
+
+ if((v1->Red != v2->Red || v1->Green != v2->Green || v1->Blue !=
v2->Blue) && dy > 1)
+ {
+ CLIPOBJ_cEnumStart(pco, FALSE, CT_RECTANGLES, CD_RIGHTDOWN, 0);
+ do
+ {
+ RECTL FillRect;
+ ULONG Color;
+
+ if (Horizontal)
+ {
+ EnumMore = CLIPOBJ_bEnum(pco, (ULONG) sizeof(RectEnum), (PVOID)
&RectEnum);
+ for (i = 0; i < RectEnum.c && RectEnum.arcl[i].top <=
rcSG.bottom; i++)
+ {
+ if (RECTL_bIntersectRect(&FillRect, &RectEnum.arcl[i],
&rcSG))
+ {
+ HVINITCOL(Red, 0);
+ HVINITCOL(Green, 1);
+ HVINITCOL(Blue, 2);
+
+ for (y = rcSG.left; y < FillRect.right; y++)
+ {
+ if (y >= FillRect.left)
+ {
+ Color = XLATEOBJ_iXlate(pxlo, RGB(c[0], c[1], c[2]));
+
DibFunctionsForBitmapFormat[psoOutput->iBitmapFormat].DIB_VLine(
+ psoOutput, y + Translate.x, FillRect.top +
Translate.y, FillRect.bottom + Translate.y, Color);
+ }
+ HVSTEPCOL(0);
+ HVSTEPCOL(1);
+ HVSTEPCOL(2);
+ }
+ }
+ }
+
+ continue;
+ }
+
+ /* vertical */
+ EnumMore = CLIPOBJ_bEnum(pco, (ULONG) sizeof(RectEnum), (PVOID)
&RectEnum);
+ for (i = 0; i < RectEnum.c && RectEnum.arcl[i].top <=
rcSG.bottom; i++)
+ {
+ if (RECTL_bIntersectRect(&FillRect, &RectEnum.arcl[i],
&rcSG))
+ {
+ HVINITCOL(Red, 0);
+ HVINITCOL(Green, 1);
+ HVINITCOL(Blue, 2);
+
+ for (y = rcSG.top; y < FillRect.bottom; y++)
+ {
+ if (y >= FillRect.top)
+ {
+ Color = XLATEOBJ_iXlate(pxlo, RGB(c[0], c[1], c[2]));
+
DibFunctionsForBitmapFormat[psoOutput->iBitmapFormat].DIB_HLine(psoOutput,
+
FillRect.left + Translate.x,
+
FillRect.right + Translate.x,
+
y + Translate.y,
+
Color);
+ }
+ HVSTEPCOL(0);
+ HVSTEPCOL(1);
+ HVSTEPCOL(2);
+ }
+ }
+ }
+
+ }
+ while (EnumMore);
+
+ return IntEngLeave(&EnterLeave);
+ }
+
+ /* rectangle has only one color, no calculation required */
CLIPOBJ_cEnumStart(pco, FALSE, CT_RECTANGLES, CD_RIGHTDOWN, 0);
do
{
- RECTL FillRect;
- ULONG Color;
-
- if(Horizontal)
- {
+ RECTL FillRect;
+ ULONG Color = XLATEOBJ_iXlate(pxlo, RGB(v1->Red, v1->Green, v1->Blue));
+
EnumMore = CLIPOBJ_bEnum(pco, (ULONG) sizeof(RectEnum), (PVOID) &RectEnum);
for (i = 0; i < RectEnum.c && RectEnum.arcl[i].top <= rcSG.bottom;
i++)
{
- if(RECTL_bIntersectRect(&FillRect, &RectEnum.arcl[i], &rcSG))
- {
- HVINITCOL(Red, 0);
- HVINITCOL(Green, 1);
- HVINITCOL(Blue, 2);
-
- for(y = rcSG.left; y < FillRect.right; y++)
+ if (RECTL_bIntersectRect(&FillRect, &RectEnum.arcl[i], &rcSG))
{
- if(y >= FillRect.left)
- {
- Color = XLATEOBJ_iXlate(pxlo, RGB(c[0], c[1], c[2]));
- DibFunctionsForBitmapFormat[psoOutput->iBitmapFormat].DIB_VLine(
- psoOutput, y + Translate.x, FillRect.top + Translate.y, FillRect.bottom
+ Translate.y, Color);
- }
- HVSTEPCOL(0);
- HVSTEPCOL(1);
- HVSTEPCOL(2);
+ for (; FillRect.top < FillRect.bottom; FillRect.top++)
+ {
+
DibFunctionsForBitmapFormat[psoOutput->iBitmapFormat].DIB_HLine(psoOutput,
+
FillRect.left + Translate.x,
+
FillRect.right + Translate.x,
+
FillRect.top + Translate.y,
+
Color);
+ }
}
- }
}
-
- continue;
- }
-
- /* vertical */
- EnumMore = CLIPOBJ_bEnum(pco, (ULONG) sizeof(RectEnum), (PVOID) &RectEnum);
- for (i = 0; i < RectEnum.c && RectEnum.arcl[i].top <= rcSG.bottom;
i++)
- {
- if(RECTL_bIntersectRect(&FillRect, &RectEnum.arcl[i], &rcSG))
- {
- HVINITCOL(Red, 0);
- HVINITCOL(Green, 1);
- HVINITCOL(Blue, 2);
-
- for(y = rcSG.top; y < FillRect.bottom; y++)
- {
- if(y >= FillRect.top)
- {
- Color = XLATEOBJ_iXlate(pxlo, RGB(c[0], c[1], c[2]));
- DibFunctionsForBitmapFormat[psoOutput->iBitmapFormat].DIB_HLine(
- psoOutput, FillRect.left + Translate.x, FillRect.right + Translate.x, y +
Translate.y, Color);
- }
- HVSTEPCOL(0);
- HVSTEPCOL(1);
- HVSTEPCOL(2);
- }
- }
- }
-
- } while(EnumMore);
+ }
+ while (EnumMore);
return IntEngLeave(&EnterLeave);
- }
-
- /* rectangle has only one color, no calculation required */
- CLIPOBJ_cEnumStart(pco, FALSE, CT_RECTANGLES, CD_RIGHTDOWN, 0);
- do
- {
- RECTL FillRect;
- ULONG Color = XLATEOBJ_iXlate(pxlo, RGB(v1->Red, v1->Green, v1->Blue));
-
- EnumMore = CLIPOBJ_bEnum(pco, (ULONG) sizeof(RectEnum), (PVOID) &RectEnum);
- for (i = 0; i < RectEnum.c && RectEnum.arcl[i].top <= rcSG.bottom;
i++)
- {
- if(RECTL_bIntersectRect(&FillRect, &RectEnum.arcl[i], &rcSG))
- {
- for(; FillRect.top < FillRect.bottom; FillRect.top++)
- {
- DibFunctionsForBitmapFormat[psoOutput->iBitmapFormat].DIB_HLine(
- psoOutput, FillRect.left + Translate.x, FillRect.right + Translate.x,
FillRect.top + Translate.y, Color);
- }
- }
- }
- } while(EnumMore);
-
- return IntEngLeave(&EnterLeave);
}
/* Fill triangle with solid color */
@@ -181,6 +190,7 @@
DibFunctionsForBitmapFormat[psoOutput->iBitmapFormat].DIB_HLine(psoOutput,
max(sx[lineto], FillRect.left), min(sx[linefrom], FillRect.right), sy, Color); \
else \
DibFunctionsForBitmapFormat[psoOutput->iBitmapFormat].DIB_HLine(psoOutput,
max(sx[linefrom], FillRect.left), min(sx[lineto], FillRect.right), sy, Color);
+
#define S_DOLINE(a,b,line) \
ex[line] += dx[line]; \
while(ex[line] > 0 && x[line] != destx[line]) \
@@ -189,11 +199,14 @@
sx[line] += incx[line]; \
ex[line] -= dy[line]; \
}
+
#define S_GOLINE(a,b,line) \
if(y >= a->y && y <= b->y) \
{
+
#define S_ENDLINE(a,b,line) \
}
+
#define S_INITLINE(a,b,line) \
x[line] = a->x; \
sx[line] = a->x + pptlDitherOrg->x; \
@@ -209,6 +222,7 @@
dc[line][id] = abs((b->col >> 8) - c[line][id]); \
ec[line][id] = -(dy[line]>>1); \
ic[line][id] = LINC[(b->col >> 8) > c[line][id]]
+
#define STEPCOL(a,b,line,col,id) \
ec[line][id] += dc[line][id]; \
while(ec[line][id] > 0) \
@@ -216,11 +230,13 @@
c[line][id] += ic[line][id]; \
ec[line][id] -= dy[line]; \
}
+
#define FINITCOL(linefrom,lineto,colid) \
gc[colid] = c[linefrom][colid]; \
gd[colid] = abs(c[lineto][colid] - gc[colid]); \
ge[colid] = -(gx >> 1); \
gi[colid] = LINC[c[lineto][colid] > gc[colid]]
+
#define FDOCOL(linefrom,lineto,colid) \
ge[colid] += gd[colid]; \
while(ge[colid] > 0) \
@@ -228,6 +244,7 @@
gc[colid] += gi[colid]; \
ge[colid] -= gx; \
}
+
#define FILLLINE(linefrom,lineto) \
gx = abs(sx[lineto] - sx[linefrom]); \
gxi = LINC[sx[linefrom] < sx[lineto]]; \
@@ -245,6 +262,7 @@
FDOCOL(linefrom, lineto, 1); \
FDOCOL(linefrom, lineto, 2); \
}
+
#define DOLINE(a,b,line) \
STEPCOL(a, b, line, Red, 0); \
STEPCOL(a, b, line, Green, 1); \
@@ -256,11 +274,14 @@
sx[line] += incx[line]; \
ex[line] -= dy[line]; \
}
+
#define GOLINE(a,b,line) \
if(y >= a->y && y <= b->y) \
{
+
#define ENDLINE(a,b,line) \
}
+
#define INITLINE(a,b,line) \
x[line] = a->x; \
sx[line] = a->x + pptlDitherOrg->x; \
@@ -269,17 +290,23 @@
incx[line] = LINC[b->x > a->x]; \
ex[line] = -(dy[line]>>1); \
destx[line] = b->x
+
#define DOINIT(a, b, line) \
INITLINE(a, b, line); \
INITCOL(a, b, line, Red, 0); \
INITCOL(a, b, line, Green, 1); \
INITCOL(a, b, line, Blue, 2);
+
#define SMALLER(a,b) (a->y < b->y) || (a->y == b->y && a->x
< b->x)
+
#define SWAP(a,b,c) c = a;\
a = b;\
b = c
+
#define NLINES 3
-BOOL FASTCALL
+
+BOOL
+FASTCALL
IntEngGradientFillTriangle(
IN SURFOBJ *psoDest,
IN CLIPOBJ *pco,
@@ -290,158 +317,161 @@
IN RECTL *prclExtents,
IN POINTL *pptlDitherOrg)
{
- SURFOBJ *psoOutput;
- PTRIVERTEX v1, v2, v3;
- //RECT_ENUM RectEnum;
- //BOOL EnumMore;
- //ULONG i;
- POINTL Translate;
- INTENG_ENTER_LEAVE EnterLeave;
- RECTL FillRect = { 0, 0, 0, 0 };
- //ULONG Color;
-
- //BOOL sx[NLINES];
- //LONG x[NLINES], dx[NLINES], dy[NLINES], incx[NLINES], ex[NLINES], destx[NLINES];
- //LONG c[NLINES][3], dc[NLINES][3], ec[NLINES][3], ic[NLINES][3]; /* colors on lines
*/
- //LONG g, gx, gxi, gc[3], gd[3], ge[3], gi[3]; /* colors in triangle */
- //LONG sy, y, bt;
-
- v1 = (pVertex + gTriangle->Vertex1);
- v2 = (pVertex + gTriangle->Vertex2);
- v3 = (pVertex + gTriangle->Vertex3);
-
- /* bubble sort */
- if(SMALLER(v2,v1))
- {
- TRIVERTEX *t;
- SWAP(v1,v2,t);
- }
- if(SMALLER(v3,v2))
- {
- TRIVERTEX *t;
- SWAP(v2,v3,t);
- if(SMALLER(v2,v1))
- {
- SWAP(v1,v2,t);
- }
- }
-
- DPRINT1("Triangle: (%i,%i) (%i,%i) (%i,%i)\n", v1->x, v1->y, v2->x,
v2->y, v3->x, v3->y);
- /* FIXME: commented out because of an endless loop - fix triangles first */
- DPRINT1("FIXME: IntEngGradientFillTriangle is broken\n");
-
- if(!IntEngEnter(&EnterLeave, psoDest, &FillRect, FALSE, &Translate,
&psoOutput))
- {
- return FALSE;
- }
-
- //if(VCMPCLRS(v1, v2, v3))
- //{
- // CLIPOBJ_cEnumStart(pco, FALSE, CT_RECTANGLES, CD_RIGHTDOWN, 0);
- // do
- // {
- // EnumMore = CLIPOBJ_bEnum(pco, (ULONG) sizeof(RectEnum), (PVOID) &RectEnum);
- // for (i = 0; i < RectEnum.c && RectEnum.arcl[i].top <=
prclExtents->bottom; i++)
- // {
- // if(RECTL_bIntersectRect(&FillRect, &RectEnum.arcl[i], prclExtents))
- // {
- // BOOL InY;
-
- // DOINIT(v1, v3, 0);
- // DOINIT(v1, v2, 1);
- // DOINIT(v2, v3, 2);
-
- // y = v1->y;
- // sy = v1->y + pptlDitherOrg->y;
- // bt = min(v3->y + pptlDitherOrg->y, FillRect.bottom);
-
- // while(sy < bt)
- // {
- // InY = !(sy < FillRect.top || sy >= FillRect.bottom);
- // GOLINE(v1, v3, 0);
- // DOLINE(v1, v3, 0);
- // ENDLINE(v1, v3, 0);
-
- // GOLINE(v1, v2, 1);
- // DOLINE(v1, v2, 1);
- // FILLLINE(0, 1);
- // ENDLINE(v1, v2, 1);
-
- // GOLINE(v2, v3, 2);
- // DOLINE(v2, v3, 2);
- // FILLLINE(0, 2);
- // ENDLINE(23, v3, 2);
-
- // y++;
- // sy++;
- // }
- // }
- // }
- // } while(EnumMore);
-
- // return IntEngLeave(&EnterLeave);
- //}
-
- ///* fill triangle with one solid color */
-
- //Color = XLATEOBJ_iXlate(pxlo, RGB(v1->Red >> 8, v1->Green >> 8,
v1->Blue >> 8));
- //CLIPOBJ_cEnumStart(pco, FALSE, CT_RECTANGLES, CD_RIGHTDOWN, 0);
- //do
- //{
- // EnumMore = CLIPOBJ_bEnum(pco, (ULONG) sizeof(RectEnum), (PVOID) &RectEnum);
- // for (i = 0; i < RectEnum.c && RectEnum.arcl[i].top <=
prclExtents->bottom; i++)
- // {
- // if(RECTL_bIntersectRect(&FillRect, &RectEnum.arcl[i], prclExtents))
- // {
- // S_INITLINE(v1, v3, 0);
- // S_INITLINE(v1, v2, 1);
- // S_INITLINE(v2, v3, 2);
-
- // y = v1->y;
- // sy = v1->y + pptlDitherOrg->y;
- // bt = min(v3->y + pptlDitherOrg->y, FillRect.bottom);
-
- // while(sy < bt)
- // {
- // S_GOLINE(v1, v3, 0);
- // S_DOLINE(v1, v3, 0);
- // S_ENDLINE(v1, v3, 0);
-
- // S_GOLINE(v1, v2, 1);
- // S_DOLINE(v1, v2, 1);
- // S_FILLLINE(0, 1);
- // S_ENDLINE(v1, v2, 1);
-
- // S_GOLINE(v2, v3, 2);
- // S_DOLINE(v2, v3, 2);
- // S_FILLLINE(0, 2);
- // S_ENDLINE(23, v3, 2);
-
- // y++;
- // sy++;
- // }
- // }
- // }
- //} while(EnumMore);
-
- return IntEngLeave(&EnterLeave);
+ SURFOBJ *psoOutput;
+ PTRIVERTEX v1, v2, v3;
+ //RECT_ENUM RectEnum;
+ //BOOL EnumMore;
+ //ULONG i;
+ POINTL Translate;
+ INTENG_ENTER_LEAVE EnterLeave;
+ RECTL FillRect = { 0, 0, 0, 0 };
+ //ULONG Color;
+
+ //BOOL sx[NLINES];
+ //LONG x[NLINES], dx[NLINES], dy[NLINES], incx[NLINES], ex[NLINES], destx[NLINES];
+ //LONG c[NLINES][3], dc[NLINES][3], ec[NLINES][3], ic[NLINES][3]; /* colors on lines
*/
+ //LONG g, gx, gxi, gc[3], gd[3], ge[3], gi[3]; /* colors in triangle */
+ //LONG sy, y, bt;
+
+ v1 = (pVertex + gTriangle->Vertex1);
+ v2 = (pVertex + gTriangle->Vertex2);
+ v3 = (pVertex + gTriangle->Vertex3);
+
+ /* bubble sort */
+ if (SMALLER(v2, v1))
+ {
+ TRIVERTEX *t;
+ SWAP(v1, v2, t);
+ }
+
+ if (SMALLER(v3, v2))
+ {
+ TRIVERTEX *t;
+ SWAP(v2, v3, t);
+ if (SMALLER(v2, v1))
+ {
+ SWAP(v1, v2, t);
+ }
+ }
+
+ DPRINT1("Triangle: (%i,%i) (%i,%i) (%i,%i)\n", v1->x, v1->y,
v2->x, v2->y, v3->x, v3->y);
+ /* FIXME: commented out because of an endless loop - fix triangles first */
+ DPRINT1("FIXME: IntEngGradientFillTriangle is broken\n");
+
+ if (!IntEngEnter(&EnterLeave, psoDest, &FillRect, FALSE, &Translate,
&psoOutput))
+ {
+ return FALSE;
+ }
+
+ //if (VCMPCLRS(v1, v2, v3))
+ //{
+ // CLIPOBJ_cEnumStart(pco, FALSE, CT_RECTANGLES, CD_RIGHTDOWN, 0);
+ // do
+ // {
+ // EnumMore = CLIPOBJ_bEnum(pco, (ULONG) sizeof(RectEnum), (PVOID)
&RectEnum);
+ // for (i = 0; i < RectEnum.c && RectEnum.arcl[i].top <=
prclExtents->bottom; i++)
+ // {
+ // if (RECTL_bIntersectRect(&FillRect, &RectEnum.arcl[i], prclExtents))
+ // {
+ // BOOL InY;
+
+ // DOINIT(v1, v3, 0);
+ // DOINIT(v1, v2, 1);
+ // DOINIT(v2, v3, 2);
+
+ // y = v1->y;
+ // sy = v1->y + pptlDitherOrg->y;
+ // bt = min(v3->y + pptlDitherOrg->y, FillRect.bottom);
+
+ // while (sy < bt)
+ // {
+ // InY = !(sy < FillRect.top || sy >= FillRect.bottom);
+ // GOLINE(v1, v3, 0);
+ // DOLINE(v1, v3, 0);
+ // ENDLINE(v1, v3, 0);
+
+ // GOLINE(v1, v2, 1);
+ // DOLINE(v1, v2, 1);
+ // FILLLINE(0, 1);
+ // ENDLINE(v1, v2, 1);
+
+ // GOLINE(v2, v3, 2);
+ // DOLINE(v2, v3, 2);
+ // FILLLINE(0, 2);
+ // ENDLINE(23, v3, 2);
+
+ // y++;
+ // sy++;
+ // }
+ // }
+ // }
+ // } while (EnumMore);
+
+ // return IntEngLeave(&EnterLeave);
+ //}
+
+ ///* fill triangle with one solid color */
+
+ //Color = XLATEOBJ_iXlate(pxlo, RGB(v1->Red >> 8, v1->Green >> 8,
v1->Blue >> 8));
+ //CLIPOBJ_cEnumStart(pco, FALSE, CT_RECTANGLES, CD_RIGHTDOWN, 0);
+ //do
+ //{
+ // EnumMore = CLIPOBJ_bEnum(pco, (ULONG) sizeof(RectEnum), (PVOID) &RectEnum);
+ // for (i = 0; i < RectEnum.c && RectEnum.arcl[i].top <=
prclExtents->bottom; i++)
+ // {
+ // if (RECTL_bIntersectRect(&FillRect, &RectEnum.arcl[i], prclExtents))
+ // {
+ // S_INITLINE(v1, v3, 0);
+ // S_INITLINE(v1, v2, 1);
+ // S_INITLINE(v2, v3, 2);
+
+ // y = v1->y;
+ // sy = v1->y + pptlDitherOrg->y;
+ // bt = min(v3->y + pptlDitherOrg->y, FillRect.bottom);
+
+ // while (sy < bt)
+ // {
+ // S_GOLINE(v1, v3, 0);
+ // S_DOLINE(v1, v3, 0);
+ // S_ENDLINE(v1, v3, 0);
+
+ // S_GOLINE(v1, v2, 1);
+ // S_DOLINE(v1, v2, 1);
+ // S_FILLLINE(0, 1);
+ // S_ENDLINE(v1, v2, 1);
+
+ // S_GOLINE(v2, v3, 2);
+ // S_DOLINE(v2, v3, 2);
+ // S_FILLLINE(0, 2);
+ // S_ENDLINE(23, v3, 2);
+
+ // y++;
+ // sy++;
+ // }
+ // }
+ // }
+ //} while (EnumMore);
+
+ return IntEngLeave(&EnterLeave);
}
-static BOOL
+static
+BOOL
IntEngIsNULLTriangle(TRIVERTEX *pVertex, GRADIENT_TRIANGLE *gt)
{
- if(COMPAREVERTEX(VERTEX(Vertex1), VERTEX(Vertex2)))
- return TRUE;
- if(COMPAREVERTEX(VERTEX(Vertex1), VERTEX(Vertex3)))
- return TRUE;
- if(COMPAREVERTEX(VERTEX(Vertex2), VERTEX(Vertex3)))
- return TRUE;
- return FALSE;
+ if(COMPAREVERTEX(VERTEX(Vertex1), VERTEX(Vertex2)))
+ return TRUE;
+ if(COMPAREVERTEX(VERTEX(Vertex1), VERTEX(Vertex3)))
+ return TRUE;
+ if(COMPAREVERTEX(VERTEX(Vertex2), VERTEX(Vertex3)))
+ return TRUE;
+ return FALSE;
}
-BOOL APIENTRY
+BOOL
+APIENTRY
EngGradientFill(
_Inout_ SURFOBJ *psoDest,
_In_ CLIPOBJ *pco,
@@ -454,90 +484,119 @@
_In_ POINTL *pptlDitherOrg,
_In_ ULONG ulMode)
{
- ULONG i;
- BOOL ret = FALSE;
-
- if (!pco)
- {
- pco = IntEngCreateClipRegion(0, 0, prclExtents);
+ ULONG i;
+ BOOL ret = FALSE;
+
if (!pco)
{
- return FALSE;
- }
- }
-
- switch(ulMode)
- {
- case GRADIENT_FILL_RECT_H:
- case GRADIENT_FILL_RECT_V:
- {
- PGRADIENT_RECT gr = (PGRADIENT_RECT)pMesh;
- for(i = 0; i < nMesh; i++, gr++)
- {
- if(!IntEngGradientFillRect(psoDest, pco, pxlo, pVertex, nVertex, gr,
prclExtents,
- pptlDitherOrg, (ulMode == GRADIENT_FILL_RECT_H)))
+ pco = IntEngCreateClipRegion(0, 0, prclExtents);
+ if (!pco)
{
- break;
+ return FALSE;
}
- }
- ret = TRUE;
- break;
- }
- case GRADIENT_FILL_TRIANGLE:
- {
- PGRADIENT_TRIANGLE gt = (PGRADIENT_TRIANGLE)pMesh;
- for(i = 0; i < nMesh; i++, gt++)
- {
- if(IntEngIsNULLTriangle(pVertex, gt))
+ }
+
+ switch(ulMode)
+ {
+ case GRADIENT_FILL_RECT_H:
+ case GRADIENT_FILL_RECT_V:
{
- /* skip empty triangles */
- continue;
+ PGRADIENT_RECT gr = (PGRADIENT_RECT)pMesh;
+ for (i = 0; i < nMesh; i++, gr++)
+ {
+ if (!IntEngGradientFillRect(psoDest,
+ pco,
+ pxlo,
+ pVertex,
+ nVertex,
+ gr,
+ prclExtents,
+ pptlDitherOrg,
+ (ulMode == GRADIENT_FILL_RECT_H)))
+ {
+ break;
+ }
+ }
+ ret = TRUE;
+ break;
}
- if(!IntEngGradientFillTriangle(psoDest, pco, pxlo, pVertex, nVertex, gt,
prclExtents,
- pptlDitherOrg))
+ case GRADIENT_FILL_TRIANGLE:
{
- break;
+ PGRADIENT_TRIANGLE gt = (PGRADIENT_TRIANGLE)pMesh;
+ for (i = 0; i < nMesh; i++, gt++)
+ {
+ if (IntEngIsNULLTriangle(pVertex, gt))
+ {
+ /* skip empty triangles */
+ continue;
+ }
+ if (!IntEngGradientFillTriangle(psoDest,
+ pco,
+ pxlo,
+ pVertex,
+ nVertex,
+ gt,
+ prclExtents,
+ pptlDitherOrg))
+ {
+ break;
+ }
+ }
+ ret = TRUE;
+ break;
}
- }
- ret = TRUE;
- break;
- }
- }
-
- return ret;
+ }
+
+ return ret;
}
-BOOL APIENTRY
+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)
+ 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)
{
- BOOL Ret;
- SURFACE *psurf;
- ASSERT(psoDest);
-
- psurf = CONTAINING_RECORD(psoDest, SURFACE, SurfObj);
- ASSERT(psurf);
-
- if(psurf->flags & HOOK_GRADIENTFILL)
- {
- Ret = GDIDEVFUNCS(psoDest).GradientFill(
- psoDest, pco, pxlo, pVertex, nVertex, pMesh, nMesh,
- prclExtents, pptlDitherOrg, ulMode);
- }
- else
- {
- Ret = EngGradientFill(psoDest, pco, pxlo, pVertex, nVertex, pMesh, nMesh,
prclExtents,
- pptlDitherOrg, ulMode);
- }
-
- return Ret;
+ BOOL Ret;
+ SURFACE *psurf;
+ ASSERT(psoDest);
+
+ psurf = CONTAINING_RECORD(psoDest, SURFACE, SurfObj);
+ ASSERT(psurf);
+
+ if (psurf->flags & HOOK_GRADIENTFILL)
+ {
+ Ret = GDIDEVFUNCS(psoDest).GradientFill(psoDest,
+ pco,
+ pxlo,
+ pVertex,
+ nVertex,
+ pMesh,
+ nMesh,
+ prclExtents,
+ pptlDitherOrg,
+ ulMode);
+ }
+ else
+ {
+ Ret = EngGradientFill(psoDest,
+ pco,
+ pxlo,
+ pVertex,
+ nVertex,
+ pMesh,
+ nMesh,
+ prclExtents,
+ pptlDitherOrg,
+ ulMode);
+ }
+
+ return Ret;
}
Modified: trunk/reactos/win32ss/gdi/eng/perfcnt.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/win32ss/gdi/eng/perfcnt.c?…
==============================================================================
--- trunk/reactos/win32ss/gdi/eng/perfcnt.c [iso-8859-1] (original)
+++ trunk/reactos/win32ss/gdi/eng/perfcnt.c [iso-8859-1] Thu May 1 09:48:40 2014
@@ -1,4 +1,4 @@
-/*
+/*
* COPYRIGHT: See COPYING in the top level directory
* PROJECT: ReactOS kernel
* PURPOSE: GDI Driver Performance Counter Functions
@@ -17,10 +17,10 @@
VOID APIENTRY
EngQueryPerformanceFrequency(LONGLONG *Frequency)
{
- LARGE_INTEGER Freq;
+ LARGE_INTEGER Freq;
- KeQueryPerformanceCounter(&Freq);
- *Frequency = Freq.QuadPart;
+ KeQueryPerformanceCounter(&Freq);
+ *Frequency = Freq.QuadPart;
}
/*
@@ -29,8 +29,8 @@
VOID APIENTRY
EngQueryPerformanceCounter(LONGLONG *Count)
{
- LARGE_INTEGER PerfCount;
+ LARGE_INTEGER PerfCount;
- PerfCount = KeQueryPerformanceCounter(NULL);
- *Count = PerfCount.QuadPart;
+ PerfCount = KeQueryPerformanceCounter(NULL);
+ *Count = PerfCount.QuadPart;
}
Modified: trunk/reactos/win32ss/gdi/eng/semaphor.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/win32ss/gdi/eng/semaphor.c…
==============================================================================
--- trunk/reactos/win32ss/gdi/eng/semaphor.c [iso-8859-1] (original)
+++ trunk/reactos/win32ss/gdi/eng/semaphor.c [iso-8859-1] Thu May 1 09:48:40 2014
@@ -8,26 +8,28 @@
*/
HSEMAPHORE
APIENTRY
-EngCreateSemaphore ( VOID )
+EngCreateSemaphore(VOID)
{
- //
www.osr.com/ddk/graphics/gdifncs_95lz.htm
- PERESOURCE psem = ExAllocatePoolWithTag( NonPagedPool, sizeof(ERESOURCE),
GDITAG_SEMAPHORE );
- if ( !psem )
- return NULL;
- if ( !NT_SUCCESS(ExInitializeResourceLite ( psem )) )
- {
- ExFreePoolWithTag ( psem, GDITAG_SEMAPHORE );
- return NULL;
- }
- return (HSEMAPHORE)psem;
+ //
www.osr.com/ddk/graphics/gdifncs_95lz.htm
+ PERESOURCE psem = ExAllocatePoolWithTag(NonPagedPool, sizeof(ERESOURCE),
GDITAG_SEMAPHORE);
+ if (!psem)
+ return NULL;
+
+ if (!NT_SUCCESS(ExInitializeResourceLite(psem)))
+ {
+ ExFreePoolWithTag ( psem, GDITAG_SEMAPHORE );
+ return NULL;
+ }
+
+ return (HSEMAPHORE)psem;
}
VOID
FASTCALL
-IntGdiAcquireSemaphore ( HSEMAPHORE hsem )
+IntGdiAcquireSemaphore(HSEMAPHORE hsem)
{
- KeEnterCriticalRegion();
- ExAcquireResourceExclusiveLite ( (PERESOURCE)hsem, TRUE );
+ KeEnterCriticalRegion();
+ ExAcquireResourceExclusiveLite ((PERESOURCE)hsem, TRUE);
}
/*
@@ -35,14 +37,14 @@
*/
VOID
APIENTRY
-EngAcquireSemaphore ( IN HSEMAPHORE hsem )
+EngAcquireSemaphore(IN HSEMAPHORE hsem)
{
- //
www.osr.com/ddk/graphics/gdifncs_14br.htm
- PTHREADINFO W32Thread;
- ASSERT(hsem);
- IntGdiAcquireSemaphore ( hsem );
- W32Thread = PsGetThreadWin32Thread(PsGetCurrentThread());
- if (W32Thread) W32Thread->dwEngAcquireCount++;
+ //
www.osr.com/ddk/graphics/gdifncs_14br.htm
+ PTHREADINFO W32Thread;
+ ASSERT(hsem);
+ IntGdiAcquireSemaphore(hsem);
+ W32Thread = PsGetThreadWin32Thread(PsGetCurrentThread());
+ if (W32Thread) W32Thread->dwEngAcquireCount++;
}
@@ -50,8 +52,8 @@
FASTCALL
IntGdiReleaseSemaphore ( HSEMAPHORE hsem )
{
- ExReleaseResourceLite ( (PERESOURCE)hsem );
- KeLeaveCriticalRegion();
+ ExReleaseResourceLite((PERESOURCE)hsem);
+ KeLeaveCriticalRegion();
}
/*
@@ -61,12 +63,12 @@
APIENTRY
EngReleaseSemaphore ( IN HSEMAPHORE hsem )
{
- //
www.osr.com/ddk/graphics/gdifncs_5u3r.htm
- PTHREADINFO W32Thread;
- ASSERT(hsem);
- W32Thread = PsGetThreadWin32Thread(PsGetCurrentThread());
- if (W32Thread) --W32Thread->dwEngAcquireCount;
- IntGdiReleaseSemaphore ( hsem );
+ //
www.osr.com/ddk/graphics/gdifncs_5u3r.htm
+ PTHREADINFO W32Thread;
+ ASSERT(hsem);
+ W32Thread = PsGetThreadWin32Thread(PsGetCurrentThread());
+ if (W32Thread) --W32Thread->dwEngAcquireCount;
+ IntGdiReleaseSemaphore(hsem);
}
VOID
@@ -89,12 +91,11 @@
APIENTRY
EngDeleteSemaphore ( IN HSEMAPHORE hsem )
{
- //
www.osr.com/ddk/graphics/gdifncs_13c7.htm
- ASSERT ( hsem );
+ //
www.osr.com/ddk/graphics/gdifncs_13c7.htm
+ ASSERT(hsem);
- ExDeleteResourceLite((PERESOURCE)hsem);
-
- ExFreePoolWithTag( (PVOID)hsem, GDITAG_SEMAPHORE);
+ ExDeleteResourceLite((PERESOURCE)hsem);
+ ExFreePoolWithTag((PVOID)hsem, GDITAG_SEMAPHORE);
}
/*
@@ -104,9 +105,9 @@
APIENTRY
EngIsSemaphoreOwned ( IN HSEMAPHORE hsem )
{
- //
www.osr.com/ddk/graphics/gdifncs_6wmf.htm
- ASSERT(hsem);
- return (((PERESOURCE)hsem)->ActiveCount > 0);
+ //
www.osr.com/ddk/graphics/gdifncs_6wmf.htm
+ ASSERT(hsem);
+ return (((PERESOURCE)hsem)->ActiveCount > 0);
}
/*
@@ -116,9 +117,9 @@
APIENTRY
EngIsSemaphoreOwnedByCurrentThread ( IN HSEMAPHORE hsem )
{
- //
www.osr.com/ddk/graphics/gdifncs_9yxz.htm
- ASSERT(hsem);
- return ExIsResourceAcquiredExclusiveLite ( (PERESOURCE)hsem );
+ //
www.osr.com/ddk/graphics/gdifncs_9yxz.htm
+ ASSERT(hsem);
+ return ExIsResourceAcquiredExclusiveLite((PERESOURCE)hsem);
}
/*
@@ -126,32 +127,32 @@
*/
BOOL APIENTRY
EngInitializeSafeSemaphore(
- OUT ENGSAFESEMAPHORE *Semaphore)
+ OUT ENGSAFESEMAPHORE *Semaphore)
{
- HSEMAPHORE hSem;
+ HSEMAPHORE hSem;
- if (InterlockedIncrement(&Semaphore->lCount) == 1)
- {
- /* Create the semaphore */
- hSem = EngCreateSemaphore();
- if (hSem == 0)
- {
- InterlockedDecrement(&Semaphore->lCount);
- return FALSE;
- }
- /* FIXME: Not thread-safe! Check result of InterlockedCompareExchangePointer
- and delete semaphore if already initialized! */
- (void)InterlockedExchangePointer((volatile PVOID *)&Semaphore->hsem, hSem);
- }
- else
- {
- /* Wait for the other thread to create the semaphore */
- ASSERT(Semaphore->lCount > 1);
- ASSERT_IRQL_LESS_OR_EQUAL(PASSIVE_LEVEL);
- while (Semaphore->hsem == NULL);
- }
+ if (InterlockedIncrement(&Semaphore->lCount) == 1)
+ {
+ /* Create the semaphore */
+ hSem = EngCreateSemaphore();
+ if (hSem == 0)
+ {
+ InterlockedDecrement(&Semaphore->lCount);
+ return FALSE;
+ }
+ /* FIXME: Not thread-safe! Check result of InterlockedCompareExchangePointer
+ and delete semaphore if already initialized! */
+ (void)InterlockedExchangePointer((volatile PVOID *)&Semaphore->hsem,
hSem);
+ }
+ else
+ {
+ /* Wait for the other thread to create the semaphore */
+ ASSERT(Semaphore->lCount > 1);
+ ASSERT_IRQL_LESS_OR_EQUAL(PASSIVE_LEVEL);
+ while (Semaphore->hsem == NULL);
+ }
- return TRUE;
+ return TRUE;
}
/*
@@ -159,14 +160,14 @@
*/
VOID APIENTRY
EngDeleteSafeSemaphore(
- IN OUT ENGSAFESEMAPHORE *Semaphore)
+ IN OUT ENGSAFESEMAPHORE *Semaphore)
{
- if (InterlockedDecrement(&Semaphore->lCount) == 0)
- {
- /* FIXME: Not thread-safe! Use result of InterlockedCompareExchangePointer! */
- EngDeleteSemaphore(Semaphore->hsem);
- (void)InterlockedExchangePointer((volatile PVOID *)&Semaphore->hsem, NULL);
- }
+ if (InterlockedDecrement(&Semaphore->lCount) == 0)
+ {
+ /* FIXME: Not thread-safe! Use result of InterlockedCompareExchangePointer! */
+ EngDeleteSemaphore(Semaphore->hsem);
+ (void)InterlockedExchangePointer((volatile PVOID *)&Semaphore->hsem,
NULL);
+ }
}
/* EOF */
Modified: trunk/reactos/win32ss/gdi/eng/sort.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/win32ss/gdi/eng/sort.c?rev…
==============================================================================
--- trunk/reactos/win32ss/gdi/eng/sort.c [iso-8859-1] (original)
+++ trunk/reactos/win32ss/gdi/eng/sort.c [iso-8859-1] Thu May 1 09:48:40 2014
@@ -1,7 +1,7 @@
/*
* COPYRIGHT: See COPYING in the top level directory
* PROJECT: ReactOS win32 subsystem
- * PURPOSE:
+ * PURPOSE:
* FILE: subsystems/win32k/eng/sort.c
* PROGRAMER: ReactOS Team
*/
@@ -14,10 +14,11 @@
/*
* @implemented
*/
-void APIENTRY
+void
+APIENTRY
EngSort(IN OUT PBYTE Buf, IN ULONG ElemSize, IN ULONG ElemCount, IN SORTCOMP CompFunc)
{
- qsort(Buf, ElemCount, ElemSize, CompFunc);
+ qsort(Buf, ElemCount, ElemSize, CompFunc);
}
/* EOF */
Modified: trunk/reactos/win32ss/gdi/eng/string.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/win32ss/gdi/eng/string.c?r…
==============================================================================
--- trunk/reactos/win32ss/gdi/eng/string.c [iso-8859-1] (original)
+++ trunk/reactos/win32ss/gdi/eng/string.c [iso-8859-1] Thu May 1 09:48:40 2014
@@ -8,82 +8,87 @@
BOOL
APIENTRY
STROBJ_bEnum(
- IN STROBJ *pstro,
- OUT ULONG *pc,
- OUT PGLYPHPOS *ppgpos
- )
+ IN STROBJ *pstro,
+ OUT ULONG *pc,
+ OUT PGLYPHPOS *ppgpos)
{
- //
www.osr.com/ddk/graphics/gdifncs_65uv.htm
- UNIMPLEMENTED;
- return FALSE;
+ //
www.osr.com/ddk/graphics/gdifncs_65uv.htm
+ UNIMPLEMENTED;
+ return FALSE;
}
DWORD
APIENTRY
-STROBJ_dwGetCodePage ( IN STROBJ *pstro )
+STROBJ_dwGetCodePage(
+ IN STROBJ *pstro)
{
- //
www.osr.com/ddk/graphics/gdifncs_9jmv.htm
- PSTRGDI pStrGdi = (PSTRGDI) pstro;
- return pStrGdi->dwCodePage;
+ //
www.osr.com/ddk/graphics/gdifncs_9jmv.htm
+ PSTRGDI pStrGdi = (PSTRGDI) pstro;
+ return pStrGdi->dwCodePage;
}
VOID
APIENTRY
-STROBJ_vEnumStart ( IN STROBJ *pstro )
+STROBJ_vEnumStart(
+ IN STROBJ *pstro)
{
- //
www.osr.com/ddk/graphics/gdifncs_32uf.htm
- UNIMPLEMENTED;
+ //
www.osr.com/ddk/graphics/gdifncs_32uf.htm
+ UNIMPLEMENTED;
}
/*
* @unimplemented
*/
-BOOL APIENTRY
+BOOL
+APIENTRY
STROBJ_bEnumPositionsOnly(
- IN STROBJ *StringObj,
- OUT ULONG *Count,
- OUT PGLYPHPOS *Pos)
+ IN STROBJ *StringObj,
+ OUT ULONG *Count,
+ OUT PGLYPHPOS *Pos)
{
- UNIMPLEMENTED;
- return (BOOL) DDI_ERROR;
+ UNIMPLEMENTED;
+ return (BOOL) DDI_ERROR;
}
/*
* @unimplemented
*/
-BOOL APIENTRY
+BOOL
+APIENTRY
STROBJ_bGetAdvanceWidths(
- IN STROBJ *StringObj,
- IN ULONG First,
- IN ULONG Count,
- OUT POINTQF *Widths)
+ IN STROBJ *StringObj,
+ IN ULONG First,
+ IN ULONG Count,
+ OUT POINTQF *Widths)
{
- UNIMPLEMENTED;
- return FALSE;
+ UNIMPLEMENTED;
+ return FALSE;
}
/*
* @implemented
*/
-FIX APIENTRY
+FIX
+APIENTRY
STROBJ_fxBreakExtra(
- IN STROBJ *StringObj)
+ IN STROBJ *StringObj)
{
- PSTRGDI pStrGdi = (PSTRGDI) StringObj;
- if (pStrGdi->StrObj.flAccel & SO_BREAK_EXTRA) return pStrGdi->fxBreakExtra;
- return (FIX) 0;
+ PSTRGDI pStrGdi = (PSTRGDI) StringObj;
+ if (pStrGdi->StrObj.flAccel & SO_BREAK_EXTRA) return
pStrGdi->fxBreakExtra;
+ return (FIX) 0;
}
/*
* @implemented
*/
-FIX APIENTRY
+FIX
+APIENTRY
STROBJ_fxCharacterExtra(
- IN STROBJ *StringObj)
+ IN STROBJ *StringObj)
{
- PSTRGDI pStrGdi = (PSTRGDI) StringObj;
- if (pStrGdi->StrObj.flAccel & SO_CHARACTER_EXTRA) return pStrGdi->fxExtra;
- return (FIX) 0;
+ PSTRGDI pStrGdi = (PSTRGDI) StringObj;
+ if (pStrGdi->StrObj.flAccel & SO_CHARACTER_EXTRA) return pStrGdi->fxExtra;
+ return (FIX)0;
}
/* EOF */
Modified: trunk/reactos/win32ss/gdi/eng/stubs.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/win32ss/gdi/eng/stubs.c?re…
==============================================================================
--- trunk/reactos/win32ss/gdi/eng/stubs.c [iso-8859-1] (original)
+++ trunk/reactos/win32ss/gdi/eng/stubs.c [iso-8859-1] Thu May 1 09:48:40 2014
@@ -8,28 +8,26 @@
#define UNIMPLEMENTED DbgPrint("(%s:%i) WIN32K: %s UNIMPLEMENTED\n", __FILE__,
__LINE__, __FUNCTION__ )
-
-/*
- * @unimplemented
- */
-BOOL
-APIENTRY
-EngTextOut (
- SURFOBJ *pso,
- STROBJ *pstro,
- FONTOBJ *pfo,
- CLIPOBJ *pco,
- RECTL *prclExtra,
- RECTL *prclOpaque,
- BRUSHOBJ *pboFore,
- BRUSHOBJ *pboOpaque,
- POINTL *pptlOrg,
- MIX mix
- )
-{
- //
www.osr.com/ddk/graphics/gdifncs_4tgn.htm
- UNIMPLEMENTED;
- return FALSE;
+/*
+ * @unimplemented
+ */
+BOOL
+APIENTRY
+EngTextOut(
+ SURFOBJ *pso,
+ STROBJ *pstro,
+ FONTOBJ *pfo,
+ CLIPOBJ *pco,
+ RECTL *prclExtra,
+ RECTL *prclOpaque,
+ BRUSHOBJ *pboFore,
+ BRUSHOBJ *pboOpaque,
+ POINTL *pptlOrg,
+ MIX mix)
+{
+ //
www.osr.com/ddk/graphics/gdifncs_4tgn.htm
+ UNIMPLEMENTED;
+ return FALSE;
}
/*
@@ -37,23 +35,23 @@
*/
PATHOBJ*
APIENTRY
-CLIPOBJ_ppoGetPath ( IN CLIPOBJ *pco )
-{
- //
www.osr.com/ddk/graphics/gdifncs_6hbb.htm
- UNIMPLEMENTED;
- return 0;
-}
-
-/*
- * @unimplemented
- */
-BOOL
-APIENTRY
-EngCheckAbort ( IN SURFOBJ *pso )
-{
- //
www.osr.com/ddk/graphics/gdifncs_3u7b.htm
- UNIMPLEMENTED;
- return FALSE;
+CLIPOBJ_ppoGetPath(IN CLIPOBJ *pco)
+{
+ //
www.osr.com/ddk/graphics/gdifncs_6hbb.htm
+ UNIMPLEMENTED;
+ return 0;
+}
+
+/*
+ * @unimplemented
+ */
+BOOL
+APIENTRY
+EngCheckAbort(IN SURFOBJ *pso)
+{
+ //
www.osr.com/ddk/graphics/gdifncs_3u7b.htm
+ UNIMPLEMENTED;
+ return FALSE;
}
/*
@@ -62,14 +60,13 @@
FD_GLYPHSET*
APIENTRY
EngComputeGlyphSet(
- IN INT nCodePage,
- IN INT nFirstChar,
- IN INT cChars
- )
-{
- //
www.osr.com/ddk/graphics/gdifncs_9607.htm
- UNIMPLEMENTED;
- return NULL;
+ IN INT nCodePage,
+ IN INT nFirstChar,
+ IN INT cChars)
+{
+ //
www.osr.com/ddk/graphics/gdifncs_9607.htm
+ UNIMPLEMENTED;
+ return NULL;
}
/*
@@ -77,11 +74,11 @@
*/
PATHOBJ*
APIENTRY
-EngCreatePath ( VOID )
-{
- //
www.osr.com/ddk/graphics/gdifncs_4aav.htm
- UNIMPLEMENTED;
- return NULL;
+EngCreatePath(VOID)
+{
+ //
www.osr.com/ddk/graphics/gdifncs_4aav.htm
+ UNIMPLEMENTED;
+ return NULL;
}
/*
@@ -89,49 +86,47 @@
*/
VOID
APIENTRY
-EngDeletePath ( IN PATHOBJ *ppo )
-{
- //
www.osr.com/ddk/graphics/gdifncs_3fl3.htm
- UNIMPLEMENTED;
-}
-
-/*
- * @unimplemented
- */
-BOOL
-APIENTRY
-EngEnumForms (
- IN HANDLE hPrinter,
- IN DWORD Level,
- OUT LPBYTE pForm,
- IN DWORD cbBuf,
- OUT LPDWORD pcbNeeded,
- OUT LPDWORD pcReturned
- )
-{
- //
www.osr.com/ddk/graphics/gdifncs_5e07.htm
- UNIMPLEMENTED;
- return FALSE;
-}
-
-/*
- * @unimplemented
- */
-BOOL
-APIENTRY
-EngFillPath (
- IN SURFOBJ *pso,
- IN PATHOBJ *ppo,
- IN CLIPOBJ *pco,
- IN BRUSHOBJ *pbo,
- IN POINTL *pptlBrushOrg,
- IN MIX mix,
- IN FLONG flOptions
- )
-{
- //
www.osr.com/ddk/graphics/gdifncs_9pyf.htm
- UNIMPLEMENTED;
- return FALSE;
+EngDeletePath(IN PATHOBJ *ppo)
+{
+ //
www.osr.com/ddk/graphics/gdifncs_3fl3.htm
+ UNIMPLEMENTED;
+}
+
+/*
+ * @unimplemented
+ */
+BOOL
+APIENTRY
+EngEnumForms(
+ IN HANDLE hPrinter,
+ IN DWORD Level,
+ OUT LPBYTE pForm,
+ IN DWORD cbBuf,
+ OUT LPDWORD pcbNeeded,
+ OUT LPDWORD pcReturned)
+{
+ //
www.osr.com/ddk/graphics/gdifncs_5e07.htm
+ UNIMPLEMENTED;
+ return FALSE;
+}
+
+/*
+ * @unimplemented
+ */
+BOOL
+APIENTRY
+EngFillPath(
+ IN SURFOBJ *pso,
+ IN PATHOBJ *ppo,
+ IN CLIPOBJ *pco,
+ IN BRUSHOBJ *pbo,
+ IN POINTL *pptlBrushOrg,
+ IN MIX mix,
+ IN FLONG flOptions)
+{
+ //
www.osr.com/ddk/graphics/gdifncs_9pyf.htm
+ UNIMPLEMENTED;
+ return FALSE;
}
/*
@@ -140,15 +135,14 @@
PVOID
APIENTRY
EngFindResource(
- IN HANDLE h,
- IN int iName,
- IN int iType,
- OUT PULONG pulSize
- )
-{
- //
www.osr.com/ddk/graphics/gdifncs_7rjb.htm
- UNIMPLEMENTED;
- return NULL;
+ IN HANDLE h,
+ IN int iName,
+ IN int iType,
+ OUT PULONG pulSize)
+{
+ //
www.osr.com/ddk/graphics/gdifncs_7rjb.htm
+ UNIMPLEMENTED;
+ return NULL;
}
/*
@@ -157,13 +151,12 @@
BOOL
APIENTRY
EngGetFileChangeTime(
- IN HANDLE h,
- OUT LARGE_INTEGER *pChangeTime
- )
-{
- //
www.osr.com/ddk/graphics/gdifncs_1i1z.htm
- UNIMPLEMENTED;
- return FALSE;
+ IN HANDLE h,
+ OUT LARGE_INTEGER *pChangeTime)
+{
+ //
www.osr.com/ddk/graphics/gdifncs_1i1z.htm
+ UNIMPLEMENTED;
+ return FALSE;
}
/*
@@ -172,13 +165,12 @@
BOOL
APIENTRY
EngGetFilePath(
- IN HANDLE h,
- OUT WCHAR (*pDest)[MAX_PATH+1]
- )
-{
- //
www.osr.com/ddk/graphics/gdifncs_5g2v.htm
- UNIMPLEMENTED;
- return FALSE;
+ IN HANDLE h,
+ OUT WCHAR (*pDest)[MAX_PATH + 1])
+{
+ //
www.osr.com/ddk/graphics/gdifncs_5g2v.htm
+ UNIMPLEMENTED;
+ return FALSE;
}
/*
@@ -187,17 +179,16 @@
BOOL
APIENTRY
EngGetForm(
- IN HANDLE hPrinter,
- IN LPWSTR pFormName,
- IN DWORD Level,
- OUT LPBYTE pForm,
- IN DWORD cbBuf,
- OUT LPDWORD pcbNeeded
- )
-{
- //
www.osr.com/ddk/graphics/gdifncs_5vvr.htm
- UNIMPLEMENTED;
- return FALSE;
+ IN HANDLE hPrinter,
+ IN LPWSTR pFormName,
+ IN DWORD Level,
+ OUT LPBYTE pForm,
+ IN DWORD cbBuf,
+ OUT LPDWORD pcbNeeded)
+{
+ //
www.osr.com/ddk/graphics/gdifncs_5vvr.htm
+ UNIMPLEMENTED;
+ return FALSE;
}
/*
@@ -206,16 +197,15 @@
BOOL
APIENTRY
EngGetPrinter(
- IN HANDLE hPrinter,
- IN DWORD dwLevel,
- OUT LPBYTE pPrinter,
- IN DWORD cbBuf,
- OUT LPDWORD pcbNeeded
- )
-{
- //
www.osr.com/ddk/graphics/gdifncs_50h3.htm
- UNIMPLEMENTED;
- return FALSE;
+ IN HANDLE hPrinter,
+ IN DWORD dwLevel,
+ OUT LPBYTE pPrinter,
+ IN DWORD cbBuf,
+ OUT LPDWORD pcbNeeded)
+{
+ //
www.osr.com/ddk/graphics/gdifncs_50h3.htm
+ UNIMPLEMENTED;
+ return FALSE;
}
/*
@@ -224,17 +214,16 @@
DWORD
APIENTRY
EngGetPrinterData(
- IN HANDLE hPrinter,
- IN LPWSTR pValueName,
- OUT LPDWORD pType,
- OUT LPBYTE pData,
- IN DWORD nSize,
- OUT LPDWORD pcbNeeded
- )
-{
- //
www.osr.com/ddk/graphics/gdifncs_8t5z.htm
- UNIMPLEMENTED;
- return 0;
+ IN HANDLE hPrinter,
+ IN LPWSTR pValueName,
+ OUT LPDWORD pType,
+ OUT LPBYTE pData,
+ IN DWORD nSize,
+ OUT LPDWORD pcbNeeded)
+{
+ //
www.osr.com/ddk/graphics/gdifncs_8t5z.htm
+ UNIMPLEMENTED;
+ return 0;
}
/*
@@ -242,11 +231,11 @@
*/
LPWSTR
APIENTRY
-EngGetPrinterDataFileName ( IN HDEV hdev )
-{
- //
www.osr.com/ddk/graphics/gdifncs_2giv.htm
- UNIMPLEMENTED;
- return NULL;
+EngGetPrinterDataFileName(IN HDEV hdev)
+{
+ //
www.osr.com/ddk/graphics/gdifncs_2giv.htm
+ UNIMPLEMENTED;
+ return NULL;
}
/*
@@ -255,148 +244,140 @@
BOOL
APIENTRY
EngGetType1FontList(
- IN HDEV hdev,
- OUT TYPE1_FONT *pType1Buffer,
- IN ULONG cjType1Buffer,
- OUT PULONG pulLocalFonts,
- OUT PULONG pulRemoteFonts,
- OUT LARGE_INTEGER *pLastModified
- )
-{
- //
www.osr.com/ddk/graphics/gdifncs_6e5j.htm
- UNIMPLEMENTED;
- return FALSE;
-}
-
-/*
- * @unimplemented
- */
-BOOL
-APIENTRY
-EngMarkBandingSurface ( IN HSURF hsurf )
-{
- //
www.osr.com/ddk/graphics/gdifncs_2jon.htm
- UNIMPLEMENTED;
- return FALSE;
+ IN HDEV hdev,
+ OUT TYPE1_FONT *pType1Buffer,
+ IN ULONG cjType1Buffer,
+ OUT PULONG pulLocalFonts,
+ OUT PULONG pulRemoteFonts,
+ OUT LARGE_INTEGER *pLastModified)
+{
+ //
www.osr.com/ddk/graphics/gdifncs_6e5j.htm
+ UNIMPLEMENTED;
+ return FALSE;
+}
+
+/*
+ * @unimplemented
+ */
+BOOL
+APIENTRY
+EngMarkBandingSurface(IN HSURF hsurf)
+{
+ //
www.osr.com/ddk/graphics/gdifncs_2jon.htm
+ UNIMPLEMENTED;
+ return FALSE;
}
INT
APIENTRY
EngMultiByteToWideChar(
- IN UINT CodePage,
- OUT LPWSTR WideCharString,
- IN INT BytesInWideCharString,
- IN LPSTR MultiByteString,
- IN INT BytesInMultiByteString
- )
-{
- //
www.osr.com/ddk/graphics/gdifncs_32cn.htm
- UNIMPLEMENTED;
- return 0;
+ IN UINT CodePage,
+ OUT LPWSTR WideCharString,
+ IN INT BytesInWideCharString,
+ IN LPSTR MultiByteString,
+ IN INT BytesInMultiByteString)
+{
+ //
www.osr.com/ddk/graphics/gdifncs_32cn.htm
+ UNIMPLEMENTED;
+ return 0;
}
VOID
APIENTRY
-EngQueryLocalTime ( OUT PENG_TIME_FIELDS ptf )
-{
- //
www.osr.com/ddk/graphics/gdifncs_389z.htm
- UNIMPLEMENTED;
+EngQueryLocalTime(OUT PENG_TIME_FIELDS ptf)
+{
+ //
www.osr.com/ddk/graphics/gdifncs_389z.htm
+ UNIMPLEMENTED;
}
ULONG
APIENTRY
EngQueryPalette(
- IN HPALETTE hPal,
- OUT ULONG *piMode,
- IN ULONG cColors,
- OUT ULONG *pulColors
- )
-{
- //
www.osr.com/ddk/graphics/gdifncs_21t3.htm
- UNIMPLEMENTED;
- return 0;
+ IN HPALETTE hPal,
+ OUT ULONG *piMode,
+ IN ULONG cColors,
+ OUT ULONG *pulColors)
+{
+ //
www.osr.com/ddk/graphics/gdifncs_21t3.htm
+ UNIMPLEMENTED;
+ return 0;
}
DWORD
APIENTRY
EngSetPrinterData(
- IN HANDLE hPrinter,
- IN LPWSTR pType,
- IN DWORD dwType,
- IN LPBYTE lpbPrinterData,
- IN DWORD cjPrinterData
- )
-{
- //
www.osr.com/ddk/graphics/gdifncs_8drb.htm
- UNIMPLEMENTED;
- return 0;
+ IN HANDLE hPrinter,
+ IN LPWSTR pType,
+ IN DWORD dwType,
+ IN LPBYTE lpbPrinterData,
+ IN DWORD cjPrinterData)
+{
+ //
www.osr.com/ddk/graphics/gdifncs_8drb.htm
+ UNIMPLEMENTED;
+ return 0;
}
BOOL
APIENTRY
EngStrokeAndFillPath(
- IN SURFOBJ *pso,
- IN PATHOBJ *ppo,
- IN CLIPOBJ *pco,
- IN XFORMOBJ *pxo,
- IN BRUSHOBJ *pboStroke,
- IN LINEATTRS *plineattrs,
- IN BRUSHOBJ *pboFill,
- IN POINTL *pptlBrushOrg,
- IN MIX mixFill,
- IN FLONG flOptions
- )
-{
- //
www.osr.com/ddk/graphics/gdifncs_2xwn.htm
- UNIMPLEMENTED;
- return FALSE;
+ IN SURFOBJ *pso,
+ IN PATHOBJ *ppo,
+ IN CLIPOBJ *pco,
+ IN XFORMOBJ *pxo,
+ IN BRUSHOBJ *pboStroke,
+ IN LINEATTRS *plineattrs,
+ IN BRUSHOBJ *pboFill,
+ IN POINTL *pptlBrushOrg,
+ IN MIX mixFill,
+ IN FLONG flOptions)
+{
+ //
www.osr.com/ddk/graphics/gdifncs_2xwn.htm
+ UNIMPLEMENTED;
+ return FALSE;
}
BOOL
APIENTRY
EngStrokePath(
- IN SURFOBJ *pso,
- IN PATHOBJ *ppo,
- IN CLIPOBJ *pco,
- IN XFORMOBJ *pxo,
- IN BRUSHOBJ *pbo,
- IN POINTL *pptlBrushOrg,
- IN LINEATTRS *plineattrs,
- IN MIX mix
- )
-{
- //
www.osr.com/ddk/graphics/gdifncs_4yaw.htm
- UNIMPLEMENTED;
- return FALSE;
+ IN SURFOBJ *pso,
+ IN PATHOBJ *ppo,
+ IN CLIPOBJ *pco,
+ IN XFORMOBJ *pxo,
+ IN BRUSHOBJ *pbo,
+ IN POINTL *pptlBrushOrg,
+ IN LINEATTRS *plineattrs,
+ IN MIX mix)
+{
+ //
www.osr.com/ddk/graphics/gdifncs_4yaw.htm
+ UNIMPLEMENTED;
+ return FALSE;
}
INT
APIENTRY
EngWideCharToMultiByte(
- IN UINT CodePage,
- IN LPWSTR WideCharString,
- IN INT BytesInWideCharString,
- OUT LPSTR MultiByteString,
- IN INT BytesInMultiByteString
- )
-{
- //
www.osr.com/ddk/graphics/gdifncs_35wn.htm
- UNIMPLEMENTED;
- return 0;
-}
-
-BOOL
-APIENTRY
-EngWritePrinter (
- IN HANDLE hPrinter,
- IN LPVOID pBuf,
- IN DWORD cbBuf,
- OUT LPDWORD pcWritten
- )
-{
- //
www.osr.com/ddk/graphics/gdifncs_9v6v.htm
- UNIMPLEMENTED;
- return FALSE;
+ IN UINT CodePage,
+ IN LPWSTR WideCharString,
+ IN INT BytesInWideCharString,
+ OUT LPSTR MultiByteString,
+ IN INT BytesInMultiByteString)
+{
+ //
www.osr.com/ddk/graphics/gdifncs_35wn.htm
+ UNIMPLEMENTED;
+ return 0;
+}
+
+BOOL
+APIENTRY
+EngWritePrinter(
+ IN HANDLE hPrinter,
+ IN LPVOID pBuf,
+ IN DWORD cbBuf,
+ OUT LPDWORD pcWritten)
+{
+ //
www.osr.com/ddk/graphics/gdifncs_9v6v.htm
+ UNIMPLEMENTED;
+ return FALSE;
}
/*
@@ -404,13 +385,12 @@
*/
ULONG
APIENTRY
-FONTOBJ_cGetAllGlyphHandles (
- IN FONTOBJ *FontObj,
- IN HGLYPH *Glyphs
- )
-{
- UNIMPLEMENTED;
- return 0;
+FONTOBJ_cGetAllGlyphHandles(
+ IN FONTOBJ *FontObj,
+ IN HGLYPH *Glyphs)
+{
+ UNIMPLEMENTED;
+ return 0;
}
/*
@@ -419,15 +399,14 @@
ULONG
APIENTRY
FONTOBJ_cGetGlyphs(
- IN FONTOBJ *FontObj,
- IN ULONG Mode,
- IN ULONG NumGlyphs,
- IN HGLYPH *GlyphHandles,
- IN PVOID *OutGlyphs
- )
-{
- UNIMPLEMENTED;
- return 0;
+ IN FONTOBJ *FontObj,
+ IN ULONG Mode,
+ IN ULONG NumGlyphs,
+ IN HGLYPH *GlyphHandles,
+ IN PVOID *OutGlyphs)
+{
+ UNIMPLEMENTED;
+ return 0;
}
/*
@@ -435,10 +414,10 @@
*/
IFIMETRICS*
APIENTRY
-FONTOBJ_pifi ( IN FONTOBJ *FontObj )
-{
- UNIMPLEMENTED;
- return NULL;
+FONTOBJ_pifi(IN FONTOBJ *FontObj)
+{
+ UNIMPLEMENTED;
+ return NULL;
}
/*
@@ -446,12 +425,12 @@
*/
PVOID
APIENTRY
-FONTOBJ_pvTrueTypeFontFile (
- IN FONTOBJ *FontObj,
- IN ULONG *FileSize)
-{
- UNIMPLEMENTED;
- return NULL;
+FONTOBJ_pvTrueTypeFontFile(
+ IN FONTOBJ *FontObj,
+ IN ULONG *FileSize)
+{
+ UNIMPLEMENTED;
+ return NULL;
}
/*
@@ -459,10 +438,10 @@
*/
XFORMOBJ*
APIENTRY
-FONTOBJ_pxoGetXform ( IN FONTOBJ *FontObj )
-{
- UNIMPLEMENTED;
- return NULL;
+FONTOBJ_pxoGetXform(IN FONTOBJ *FontObj)
+{
+ UNIMPLEMENTED;
+ return NULL;
}
/*
@@ -470,157 +449,149 @@
*/
VOID
APIENTRY
-FONTOBJ_vGetInfo (
- IN FONTOBJ *FontObj,
- IN ULONG InfoSize,
- OUT PFONTINFO FontInfo)
-{
- UNIMPLEMENTED;
+FONTOBJ_vGetInfo(
+ IN FONTOBJ *FontObj,
+ IN ULONG InfoSize,
+ OUT PFONTINFO FontInfo)
+{
+ UNIMPLEMENTED;
}
LONG
APIENTRY
HT_ComputeRGBGammaTable(
- IN USHORT GammaTableEntries,
- IN USHORT GammaTableType,
- IN USHORT RedGamma,
- IN USHORT GreenGamma,
- IN USHORT BlueGamma,
- OUT LPBYTE pGammaTable
- )
-{
- //
www.osr.com/ddk/graphics/gdifncs_9dpj.htm
- UNIMPLEMENTED;
- return 0;
+ IN USHORT GammaTableEntries,
+ IN USHORT GammaTableType,
+ IN USHORT RedGamma,
+ IN USHORT GreenGamma,
+ IN USHORT BlueGamma,
+ OUT LPBYTE pGammaTable)
+{
+ //
www.osr.com/ddk/graphics/gdifncs_9dpj.htm
+ UNIMPLEMENTED;
+ return 0;
}
LONG
APIENTRY
HT_Get8BPPFormatPalette(
- OUT LPPALETTEENTRY pPaletteEntry,
- IN USHORT RedGamma,
- IN USHORT GreenGamma,
- IN USHORT BlueGamma
- )
-{
- //
www.osr.com/ddk/graphics/gdifncs_8kvb.htm
- UNIMPLEMENTED;
- return 0;
-}
-
-BOOL
-APIENTRY
-PATHOBJ_bCloseFigure ( IN PATHOBJ *ppo )
-{
- //
www.osr.com/ddk/graphics/gdifncs_5mhz.htm
- UNIMPLEMENTED;
- return FALSE;
-}
-
-BOOL
-APIENTRY
-PATHOBJ_bEnum (
- IN PATHOBJ *ppo,
- OUT PATHDATA *ppd
- )
-{
- //
www.osr.com/ddk/graphics/gdifncs_98o7.htm
- UNIMPLEMENTED;
- return FALSE;
+ OUT LPPALETTEENTRY pPaletteEntry,
+ IN USHORT RedGamma,
+ IN USHORT GreenGamma,
+ IN USHORT BlueGamma)
+{
+ //
www.osr.com/ddk/graphics/gdifncs_8kvb.htm
+ UNIMPLEMENTED;
+ return 0;
+}
+
+BOOL
+APIENTRY
+PATHOBJ_bCloseFigure(IN PATHOBJ *ppo)
+{
+ //
www.osr.com/ddk/graphics/gdifncs_5mhz.htm
+ UNIMPLEMENTED;
+ return FALSE;
+}
+
+BOOL
+APIENTRY
+PATHOBJ_bEnum(
+ IN PATHOBJ *ppo,
+ OUT PATHDATA *ppd)
+{
+ //
www.osr.com/ddk/graphics/gdifncs_98o7.htm
+ UNIMPLEMENTED;
+ return FALSE;
}
BOOL
APIENTRY
PATHOBJ_bEnumClipLines(
- IN PATHOBJ *ppo,
- IN ULONG cb,
- OUT CLIPLINE *pcl
- )
-{
- //
www.osr.com/ddk/graphics/gdifncs_4147.htm
- UNIMPLEMENTED;
- return FALSE;
+ IN PATHOBJ *ppo,
+ IN ULONG cb,
+ OUT CLIPLINE *pcl)
+{
+ //
www.osr.com/ddk/graphics/gdifncs_4147.htm
+ UNIMPLEMENTED;
+ return FALSE;
}
BOOL
APIENTRY
PATHOBJ_bMoveTo(
- IN PATHOBJ *ppo,
- IN POINTFIX ptfx
- )
-{
- //
www.osr.com/ddk/graphics/gdifncs_70vb.htm
- UNIMPLEMENTED;
- return FALSE;
+ IN PATHOBJ *ppo,
+ IN POINTFIX ptfx)
+{
+ //
www.osr.com/ddk/graphics/gdifncs_70vb.htm
+ UNIMPLEMENTED;
+ return FALSE;
}
BOOL
APIENTRY
PATHOBJ_bPolyBezierTo(
- IN PATHOBJ *ppo,
- IN POINTFIX *pptfx,
- IN ULONG cptfx
- )
-{
- //
www.osr.com/ddk/graphics/gdifncs_2c9z.htm
- UNIMPLEMENTED;
- return FALSE;
+ IN PATHOBJ *ppo,
+ IN POINTFIX *pptfx,
+ IN ULONG cptfx)
+{
+ //
www.osr.com/ddk/graphics/gdifncs_2c9z.htm
+ UNIMPLEMENTED;
+ return FALSE;
}
BOOL
APIENTRY
PATHOBJ_bPolyLineTo(
- IN PATHOBJ *ppo,
- IN POINTFIX *pptfx,
- IN ULONG cptfx
- )
-{
- //
www.osr.com/ddk/graphics/gdifncs_0x47.htm
- UNIMPLEMENTED;
- return FALSE;
+ IN PATHOBJ *ppo,
+ IN POINTFIX *pptfx,
+ IN ULONG cptfx)
+{
+ //
www.osr.com/ddk/graphics/gdifncs_0x47.htm
+ UNIMPLEMENTED;
+ return FALSE;
}
VOID
APIENTRY
-PATHOBJ_vEnumStart ( IN PATHOBJ *ppo )
-{
- //
www.osr.com/ddk/graphics/gdifncs_74br.htm
- UNIMPLEMENTED;
+PATHOBJ_vEnumStart(IN PATHOBJ *ppo)
+{
+ //
www.osr.com/ddk/graphics/gdifncs_74br.htm
+ UNIMPLEMENTED;
}
VOID
APIENTRY
PATHOBJ_vEnumStartClipLines(
- IN PATHOBJ *ppo,
- IN CLIPOBJ *pco,
- IN SURFOBJ *pso,
- IN LINEATTRS *pla
- )
-{
- //
www.osr.com/ddk/graphics/gdifncs_5grr.htm
- UNIMPLEMENTED;
+ IN PATHOBJ *ppo,
+ IN CLIPOBJ *pco,
+ IN SURFOBJ *pso,
+ IN LINEATTRS *pla)
+{
+ //
www.osr.com/ddk/graphics/gdifncs_5grr.htm
+ UNIMPLEMENTED;
}
VOID
APIENTRY
PATHOBJ_vGetBounds(
- IN PATHOBJ *ppo,
- OUT PRECTFX prectfx
- )
-{
- //
www.osr.com/ddk/graphics/gdifncs_8qp3.htm
- UNIMPLEMENTED;
-}
-
-/*
- * @unimplemented
- */
-ULONG APIENTRY
+ IN PATHOBJ *ppo,
+ OUT PRECTFX prectfx)
+{
+ //
www.osr.com/ddk/graphics/gdifncs_8qp3.htm
+ UNIMPLEMENTED;
+}
+
+/*
+ * @unimplemented
+ */
+ULONG
+APIENTRY
EngDitherColor(
- IN HDEV hdev,
- IN ULONG iMode,
- IN ULONG rgb,
- OUT ULONG *pul)
+ IN HDEV hdev,
+ IN ULONG iMode,
+ IN ULONG rgb,
+ OUT ULONG *pul)
{
*pul = 0;
return DCR_SOLID;
@@ -629,12 +600,13 @@
/*
* @unimplemented
*/
-HANDLE APIENTRY
+HANDLE
+APIENTRY
BRUSHOBJ_hGetColorTransform(
- IN BRUSHOBJ *Brush)
-{
- UNIMPLEMENTED;
- return NULL;
+ IN BRUSHOBJ *Brush)
+{
+ UNIMPLEMENTED;
+ return NULL;
}
/*
@@ -643,85 +615,90 @@
BOOL
APIENTRY
EngDeleteFile(
- IN LPWSTR FileName)
-{
- UNIMPLEMENTED;
- return FALSE;
-}
-
-/*
- * @unimplemented
- */
-BOOL APIENTRY
+ IN LPWSTR FileName)
+{
+ UNIMPLEMENTED;
+ return FALSE;
+}
+
+/*
+ * @unimplemented
+ */
+BOOL
+APIENTRY
EngGetPrinterDriver(
- IN HANDLE Printer,
- IN LPWSTR Environment,
- IN DWORD Level,
- OUT BYTE *DrvInfo,
- IN DWORD Buf,
- OUT DWORD *Needed)
-{
- UNIMPLEMENTED;
- return FALSE;
-}
-
-/*
- * @unimplemented
- */
-ULONG APIENTRY
+ IN HANDLE Printer,
+ IN LPWSTR Environment,
+ IN DWORD Level,
+ OUT BYTE *DrvInfo,
+ IN DWORD Buf,
+ OUT DWORD *Needed)
+{
+ UNIMPLEMENTED;
+ return FALSE;
+}
+
+/*
+ * @unimplemented
+ */
+ULONG
+APIENTRY
EngHangNotification(
- IN HDEV Dev,
- IN PVOID Reserved)
-{
- UNIMPLEMENTED;
- return EHN_ERROR;
-}
-
-/*
- * @unimplemented
- */
-BOOL APIENTRY
+ IN HDEV Dev,
+ IN PVOID Reserved)
+{
+ UNIMPLEMENTED;
+ return EHN_ERROR;
+}
+
+/*
+ * @unimplemented
+ */
+BOOL
+APIENTRY
EngLpkInstalled()
{
- UNIMPLEMENTED;
- return FALSE;
-}
-
-/*
- * @unimplemented
- */
-BOOL APIENTRY
+ UNIMPLEMENTED;
+ return FALSE;
+}
+
+/*
+ * @unimplemented
+ */
+BOOL
+APIENTRY
EngPlgBlt(
- IN SURFOBJ *Dest,
- IN SURFOBJ *Source,
- IN SURFOBJ *Mask,
- IN CLIPOBJ *Clip,
- IN XLATEOBJ *Xlate,
- IN COLORADJUSTMENT *ColorAdjustment,
- IN POINTL *BrusOrigin,
- IN POINTFIX *DestPoints,
- IN RECTL *SourceRect,
- IN POINTL *MaskPoint,
- IN ULONG Mode)
-{
- UNIMPLEMENTED;
- return FALSE;
-}
-
-/*
- * @unimplemented
- */
-BOOL APIENTRY
+ IN SURFOBJ *Dest,
+ IN SURFOBJ *Source,
+ IN SURFOBJ *Mask,
+ IN CLIPOBJ *Clip,
+ IN XLATEOBJ *Xlate,
+ IN COLORADJUSTMENT *ColorAdjustment,
+ IN POINTL *BrusOrigin,
+ IN POINTFIX *DestPoints,
+ IN RECTL *SourceRect,
+ IN POINTL *MaskPoint,
+ IN ULONG Mode)
+{
+ UNIMPLEMENTED;
+ return FALSE;
+}
+
+/*
+ * @unimplemented
+ */
+BOOL
+APIENTRY
EngQueryDeviceAttribute(
- IN HDEV Device,
- IN ENG_DEVICE_ATTRIBUTE Attribute,
- IN VOID *In,
- IN ULONG InSize,
- OUT VOID *Out,
- OUT ULONG OutSize)
-{
- UNIMPLEMENTED;
- return FALSE;
+ IN HDEV Device,
+ IN ENG_DEVICE_ATTRIBUTE Attribute,
+ IN VOID *In,
+ IN ULONG InSize,
+ OUT VOID *Out,
+ OUT ULONG OutSize)
+{
+ UNIMPLEMENTED;
+ return FALSE;
}
/*
@@ -731,74 +708,79 @@
APIENTRY
EngQueryFileTimeStamp(IN LPWSTR FileName)
{
- LARGE_INTEGER FileTime;
- FileTime.QuadPart = 0;
- UNIMPLEMENTED;
- return FileTime;
-}
-
-/*
- * @unimplemented
- */
-FD_GLYPHSET * APIENTRY
+ LARGE_INTEGER FileTime;
+ FileTime.QuadPart = 0;
+ UNIMPLEMENTED;
+ return FileTime;
+}
+
+/*
+ * @unimplemented
+ */
+FD_GLYPHSET *
+APIENTRY
FONTOBJ_pfdg(
- IN FONTOBJ *FontObj)
-{
- UNIMPLEMENTED;
- return NULL;
-}
-
-/*
- * @unimplemented
- */
-PBYTE APIENTRY
+ IN FONTOBJ *FontObj)
+{
+ UNIMPLEMENTED;
+ return NULL;
+}
+
+/*
+ * @unimplemented
+ */
+PBYTE
+APIENTRY
FONTOBJ_pjOpenTypeTablePointer(
- IN FONTOBJ *FontObj,
- IN ULONG Tag,
- OUT ULONG *Table)
-{
- UNIMPLEMENTED;
- return NULL;
-}
-
-/*
- * @unimplemented
- */
-PFD_GLYPHATTR APIENTRY
+ IN FONTOBJ *FontObj,
+ IN ULONG Tag,
+ OUT ULONG *Table)
+{
+ UNIMPLEMENTED;
+ return NULL;
+}
+
+/*
+ * @unimplemented
+ */
+PFD_GLYPHATTR
+APIENTRY
FONTOBJ_pQueryGlyphAttrs(
- IN FONTOBJ *FontObj,
- IN ULONG Mode)
-{
- UNIMPLEMENTED;
- return NULL;
-}
-
-/*
- * @unimplemented
- */
-LPWSTR APIENTRY
+ IN FONTOBJ *FontObj,
+ IN ULONG Mode)
+{
+ UNIMPLEMENTED;
+ return NULL;
+}
+
+/*
+ * @unimplemented
+ */
+LPWSTR
+APIENTRY
FONTOBJ_pwszFontFilePaths(
- IN FONTOBJ *FontObj,
- OUT ULONG *PathLength)
-{
- UNIMPLEMENTED;
- return NULL;
-}
-
-/*
- * @unimplemented
- */
-LONG APIENTRY
+ IN FONTOBJ *FontObj,
+ OUT ULONG *PathLength)
+{
+ UNIMPLEMENTED;
+ return NULL;
+}
+
+/*
+ * @unimplemented
+ */
+LONG
+APIENTRY
HT_Get8BPPMaskPalette(
- IN OUT LPPALETTEENTRY PaletteEntry,
- IN BOOL Use8BPPMaskPal,
- IN BYTE CMYMask,
- IN USHORT RedGamma,
- IN USHORT GreenGamma,
- IN USHORT BlueGamma)
-{
- UNIMPLEMENTED;
- return 0;
+ IN OUT LPPALETTEENTRY PaletteEntry,
+ IN BOOL Use8BPPMaskPal,
+ IN BYTE CMYMask,
+ IN USHORT RedGamma,
+ IN USHORT GreenGamma,
+ IN USHORT BlueGamma)
+{
+ UNIMPLEMENTED;
+ return 0;
}
/*
@@ -808,8 +790,8 @@
APIENTRY
NtGdiAnyLinkedFonts()
{
- UNIMPLEMENTED;
- return FALSE;
+ UNIMPLEMENTED;
+ return FALSE;
}
/*
@@ -848,8 +830,7 @@
IN DWORD cjBuffer,
IN DESIGNVECTOR *pdv,
IN ULONG cjDV,
- OUT DWORD *pNumFonts
-)
+ OUT DWORD *pNumFonts)
{
UNIMPLEMENTED;
return NULL;
@@ -1208,7 +1189,7 @@
*/
BOOL
APIENTRY
-NtGdiInitSpool()
+NtGdiInitSpool(VOID)
{
UNIMPLEMENTED;
return FALSE;
@@ -1219,9 +1200,10 @@
*/
INT
APIENTRY
-NtGdiQueryFonts( OUT PUNIVERSAL_FONT_ID pufiFontList,
- IN ULONG nBufferSize,
- OUT PLARGE_INTEGER pTimeStamp)
+NtGdiQueryFonts(
+ OUT PUNIVERSAL_FONT_ID pufiFontList,
+ IN ULONG nBufferSize,
+ OUT PLARGE_INTEGER pTimeStamp)
{
UNIMPLEMENTED;
return 0;
@@ -1232,10 +1214,11 @@
*/
INT
APIENTRY
-NtGdiGetSpoolMessage( DWORD u1,
- DWORD u2,
- DWORD u3,
- DWORD u4)
+NtGdiGetSpoolMessage(
+ DWORD u1,
+ DWORD u2,
+ DWORD u3,
+ DWORD u4)
{
/* FIXME: The prototypes */
UNIMPLEMENTED;
@@ -1559,7 +1542,7 @@
*/
BOOL
APIENTRY
-NtGdiInit()
+NtGdiInit(VOID)
{
return TRUE;
}
@@ -1686,17 +1669,18 @@
BOOL
APIENTRY
EngControlSprites(
- IN WNDOBJ *pwo,
- IN FLONG fl)
-{
- UNIMPLEMENTED;
- return FALSE;
+ IN WNDOBJ *pwo,
+ IN FLONG fl)
+{
+ UNIMPLEMENTED;
+ return FALSE;
}
PVOID
APIENTRY
-EngFntCacheAlloc(IN ULONG FastCheckSum,
- IN ULONG ulSize)
+EngFntCacheAlloc(
+ IN ULONG FastCheckSum,
+ IN ULONG ulSize)
{
UNIMPLEMENTED;
return NULL;
@@ -1704,16 +1688,18 @@
VOID
APIENTRY
-EngFntCacheFault(IN ULONG ulFastCheckSum,
- IN ULONG iFaultMode)
+EngFntCacheFault(
+ IN ULONG ulFastCheckSum,
+ IN ULONG iFaultMode)
{
UNIMPLEMENTED;
}
PVOID
APIENTRY
-EngFntCacheLookUp(IN ULONG FastCheckSum,
- OUT PULONG pulSize)
+EngFntCacheLookUp(
+ IN ULONG FastCheckSum,
+ OUT PULONG pulSize)
{
UNIMPLEMENTED;
return NULL;
@@ -1721,15 +1707,16 @@
BOOLEAN
APIENTRY
-EngNineGrid(IN SURFOBJ* pDestSurfaceObj,
- IN SURFOBJ* pSourceSurfaceObj,
- IN CLIPOBJ* pClipObj,
- IN XLATEOBJ* pXlateObj,
- IN RECTL* prclSource,
- IN RECTL* prclDest,
- PVOID pvUnknown1,
- PVOID pvUnknown2,
- DWORD dwReserved)
+EngNineGrid(
+ IN SURFOBJ* pDestSurfaceObj,
+ IN SURFOBJ* pSourceSurfaceObj,
+ IN CLIPOBJ* pClipObj,
+ IN XLATEOBJ* pXlateObj,
+ IN RECTL* prclSource,
+ IN RECTL* prclDest,
+ PVOID pvUnknown1,
+ PVOID pvUnknown2,
+ DWORD dwReserved)
{
UNIMPLEMENTED;
return FALSE;
Modified: trunk/reactos/win32ss/gdi/eng/transblt.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/win32ss/gdi/eng/transblt.c…
==============================================================================
--- trunk/reactos/win32ss/gdi/eng/transblt.c [iso-8859-1] (original)
+++ trunk/reactos/win32ss/gdi/eng/transblt.c [iso-8859-1] Thu May 1 09:48:40 2014
@@ -11,277 +11,293 @@
#define NDEBUG
#include <debug.h>
-BOOL APIENTRY
-EngTransparentBlt(SURFOBJ *psoDest,
- SURFOBJ *psoSource,
- CLIPOBJ *Clip,
- XLATEOBJ *ColorTranslation,
- PRECTL DestRect,
- PRECTL SourceRect,
- ULONG iTransColor,
- ULONG Reserved)
+BOOL
+APIENTRY
+EngTransparentBlt(
+ SURFOBJ *psoDest,
+ SURFOBJ *psoSource,
+ CLIPOBJ *Clip,
+ XLATEOBJ *ColorTranslation,
+ PRECTL DestRect,
+ PRECTL SourceRect,
+ ULONG iTransColor,
+ ULONG Reserved)
{
- BOOL Ret = TRUE;
- BYTE ClippingType;
- INTENG_ENTER_LEAVE EnterLeaveSource, EnterLeaveDest;
- SURFOBJ *InputObj, *OutputObj;
- RECTL OutputRect, InputRect;
- POINTL Translate;
-
- LONG DstHeight;
- LONG DstWidth;
- LONG SrcHeight;
- LONG SrcWidth;
-
- InputRect = *SourceRect;
-
- if(!IntEngEnter(&EnterLeaveSource, psoSource, &InputRect, TRUE, &Translate,
&InputObj))
- {
- return FALSE;
- }
- InputRect.left += Translate.x;
- InputRect.right += Translate.x;
- InputRect.top += Translate.y;
- InputRect.bottom += Translate.y;
-
- OutputRect = *DestRect;
- if (OutputRect.right < OutputRect.left)
- {
- OutputRect.left = DestRect->right;
- OutputRect.right = DestRect->left;
- }
- if (OutputRect.bottom < OutputRect.top)
- {
- OutputRect.top = DestRect->bottom;
- OutputRect.bottom = DestRect->top;
- }
-
- if(Clip)
- {
- if(OutputRect.left < Clip->rclBounds.left)
- {
- InputRect.left += Clip->rclBounds.left - OutputRect.left;
- OutputRect.left = Clip->rclBounds.left;
- }
- if(Clip->rclBounds.right < OutputRect.right)
- {
- InputRect.right -= OutputRect.right - Clip->rclBounds.right;
- OutputRect.right = Clip->rclBounds.right;
- }
- if(OutputRect.top < Clip->rclBounds.top)
- {
- InputRect.top += Clip->rclBounds.top - OutputRect.top;
- OutputRect.top = Clip->rclBounds.top;
- }
- if(Clip->rclBounds.bottom < OutputRect.bottom)
- {
- InputRect.bottom -= OutputRect.bottom - Clip->rclBounds.bottom;
- OutputRect.bottom = Clip->rclBounds.bottom;
- }
- }
-
- /* Check for degenerate case: if height or width of OutputRect is 0 pixels there's
- nothing to do */
- if(OutputRect.right <= OutputRect.left || OutputRect.bottom <= OutputRect.top)
- {
+ BOOL Ret = TRUE;
+ BYTE ClippingType;
+ INTENG_ENTER_LEAVE EnterLeaveSource, EnterLeaveDest;
+ SURFOBJ *InputObj, *OutputObj;
+ RECTL OutputRect, InputRect;
+ POINTL Translate;
+
+ LONG DstHeight;
+ LONG DstWidth;
+ LONG SrcHeight;
+ LONG SrcWidth;
+
+ InputRect = *SourceRect;
+
+ if (!IntEngEnter(&EnterLeaveSource, psoSource, &InputRect, TRUE,
&Translate, &InputObj))
+ {
+ return FALSE;
+ }
+ InputRect.left += Translate.x;
+ InputRect.right += Translate.x;
+ InputRect.top += Translate.y;
+ InputRect.bottom += Translate.y;
+
+ OutputRect = *DestRect;
+ if (OutputRect.right < OutputRect.left)
+ {
+ OutputRect.left = DestRect->right;
+ OutputRect.right = DestRect->left;
+ }
+ if (OutputRect.bottom < OutputRect.top)
+ {
+ OutputRect.top = DestRect->bottom;
+ OutputRect.bottom = DestRect->top;
+ }
+
+ if (Clip)
+ {
+ if (OutputRect.left < Clip->rclBounds.left)
+ {
+ InputRect.left += Clip->rclBounds.left - OutputRect.left;
+ OutputRect.left = Clip->rclBounds.left;
+ }
+ if (Clip->rclBounds.right < OutputRect.right)
+ {
+ InputRect.right -= OutputRect.right - Clip->rclBounds.right;
+ OutputRect.right = Clip->rclBounds.right;
+ }
+ if (OutputRect.top < Clip->rclBounds.top)
+ {
+ InputRect.top += Clip->rclBounds.top - OutputRect.top;
+ OutputRect.top = Clip->rclBounds.top;
+ }
+ if (Clip->rclBounds.bottom < OutputRect.bottom)
+ {
+ InputRect.bottom -= OutputRect.bottom - Clip->rclBounds.bottom;
+ OutputRect.bottom = Clip->rclBounds.bottom;
+ }
+ }
+
+ /* Check for degenerate case: if height or width of OutputRect is 0 pixels
there's
+ nothing to do */
+ if (OutputRect.right <= OutputRect.left || OutputRect.bottom <=
OutputRect.top)
+ {
+ IntEngLeave(&EnterLeaveSource);
+ return TRUE;
+ }
+
+ if (!IntEngEnter(&EnterLeaveDest, psoDest, &OutputRect, FALSE,
&Translate, &OutputObj))
+ {
+ IntEngLeave(&EnterLeaveSource);
+ return FALSE;
+ }
+
+ OutputRect.left = DestRect->left + Translate.x;
+ OutputRect.right = DestRect->right + Translate.x;
+ OutputRect.top = DestRect->top + Translate.y;
+ OutputRect.bottom = DestRect->bottom + Translate.y;
+
+ ClippingType = (Clip ? Clip->iDComplexity : DC_TRIVIAL);
+
+ DstHeight = OutputRect.bottom - OutputRect.top;
+ DstWidth = OutputRect.right - OutputRect.left;
+ SrcHeight = InputRect.bottom - InputRect.top;
+ SrcWidth = InputRect.right - InputRect.left;
+ switch (ClippingType)
+ {
+ case DC_TRIVIAL:
+ {
+ Ret =
DibFunctionsForBitmapFormat[psoDest->iBitmapFormat].DIB_TransparentBlt(
+ OutputObj, InputObj, &OutputRect, &InputRect,
ColorTranslation, iTransColor);
+ break;
+ }
+ case DC_RECT:
+ {
+ RECTL ClipRect, CombinedRect;
+ RECTL InputToCombinedRect;
+
+ ClipRect.left = Clip->rclBounds.left + Translate.x;
+ ClipRect.right = Clip->rclBounds.right + Translate.x;
+ ClipRect.top = Clip->rclBounds.top + Translate.y;
+ ClipRect.bottom = Clip->rclBounds.bottom + Translate.y;
+ if (RECTL_bIntersectRect(&CombinedRect, &OutputRect, &ClipRect))
+ {
+ InputToCombinedRect.top = InputRect.top + (CombinedRect.top -
OutputRect.top) * SrcHeight / DstHeight;
+ InputToCombinedRect.bottom = InputRect.top + (CombinedRect.bottom -
OutputRect.top) * SrcHeight / DstHeight;
+ InputToCombinedRect.left = InputRect.left + (CombinedRect.left -
OutputRect.left) * SrcWidth / DstWidth;
+ InputToCombinedRect.right = InputRect.left + (CombinedRect.right -
OutputRect.left) * SrcWidth / DstWidth;
+ Ret =
DibFunctionsForBitmapFormat[psoDest->iBitmapFormat].DIB_TransparentBlt(
+ OutputObj, InputObj, &CombinedRect,
&InputToCombinedRect, ColorTranslation, iTransColor);
+ }
+ break;
+ }
+ case DC_COMPLEX:
+ {
+ ULONG Direction, i;
+ RECT_ENUM RectEnum;
+ BOOL EnumMore;
+
+ if (OutputObj == InputObj)
+ {
+ if (OutputRect.top < InputRect.top)
+ {
+ Direction = OutputRect.left < (InputRect.left ? CD_RIGHTDOWN :
CD_LEFTDOWN);
+ }
+ else
+ {
+ Direction = OutputRect.left < (InputRect.left ? CD_RIGHTUP :
CD_LEFTUP);
+ }
+ }
+ else
+ {
+ Direction = CD_ANY;
+ }
+
+ CLIPOBJ_cEnumStart(Clip, FALSE, CT_RECTANGLES, Direction, 0);
+ do
+ {
+ EnumMore = CLIPOBJ_bEnum(Clip, sizeof(RectEnum), (PVOID)&RectEnum);
+ for (i = 0; i < RectEnum.c; i++)
+ {
+ RECTL ClipRect, CombinedRect;
+ RECTL InputToCombinedRect;
+
+ ClipRect.left = RectEnum.arcl[i].left + Translate.x;
+ ClipRect.right = RectEnum.arcl[i].right + Translate.x;
+ ClipRect.top = RectEnum.arcl[i].top + Translate.y;
+ ClipRect.bottom = RectEnum.arcl[i].bottom + Translate.y;
+ if (RECTL_bIntersectRect(&CombinedRect, &OutputRect,
&ClipRect))
+ {
+ InputToCombinedRect.top = InputRect.top + (CombinedRect.top -
OutputRect.top) * SrcHeight / DstHeight;
+ InputToCombinedRect.bottom = InputRect.top + (CombinedRect.bottom
- OutputRect.top) * SrcHeight / DstHeight;
+ InputToCombinedRect.left = InputRect.left + (CombinedRect.left -
OutputRect.left) * SrcWidth / DstWidth;
+ InputToCombinedRect.right = InputRect.left + (CombinedRect.right
- OutputRect.left) * SrcWidth / DstWidth;
+
+ Ret =
DibFunctionsForBitmapFormat[psoDest->iBitmapFormat].DIB_TransparentBlt(
+ OutputObj, InputObj, &CombinedRect,
&InputToCombinedRect, ColorTranslation, iTransColor);
+ if (!Ret)
+ {
+ break;
+ }
+ }
+ }
+ }
+ while (EnumMore && Ret);
+ break;
+ }
+ default:
+ {
+ Ret = FALSE;
+ break;
+ }
+ }
+
+ IntEngLeave(&EnterLeaveDest);
IntEngLeave(&EnterLeaveSource);
- return TRUE;
- }
-
- if(!IntEngEnter(&EnterLeaveDest, psoDest, &OutputRect, FALSE, &Translate,
&OutputObj))
- {
- IntEngLeave(&EnterLeaveSource);
- return FALSE;
- }
-
- OutputRect.left = DestRect->left + Translate.x;
- OutputRect.right = DestRect->right + Translate.x;
- OutputRect.top = DestRect->top + Translate.y;
- OutputRect.bottom = DestRect->bottom + Translate.y;
-
- ClippingType = (Clip ? Clip->iDComplexity : DC_TRIVIAL);
-
- DstHeight = OutputRect.bottom - OutputRect.top;
- DstWidth = OutputRect.right - OutputRect.left;
- SrcHeight = InputRect.bottom - InputRect.top;
- SrcWidth = InputRect.right - InputRect.left;
- switch(ClippingType)
- {
- case DC_TRIVIAL:
- {
- Ret = DibFunctionsForBitmapFormat[psoDest->iBitmapFormat].DIB_TransparentBlt(
- OutputObj, InputObj, &OutputRect, &InputRect, ColorTranslation,
iTransColor);
- break;
- }
- case DC_RECT:
- {
- RECTL ClipRect, CombinedRect;
- RECTL InputToCombinedRect;
-
- ClipRect.left = Clip->rclBounds.left + Translate.x;
- ClipRect.right = Clip->rclBounds.right + Translate.x;
- ClipRect.top = Clip->rclBounds.top + Translate.y;
- ClipRect.bottom = Clip->rclBounds.bottom + Translate.y;
- if (RECTL_bIntersectRect(&CombinedRect, &OutputRect, &ClipRect))
- {
- InputToCombinedRect.top = InputRect.top + (CombinedRect.top - OutputRect.top) *
SrcHeight / DstHeight;
- InputToCombinedRect.bottom = InputRect.top + (CombinedRect.bottom -
OutputRect.top) * SrcHeight / DstHeight;
- InputToCombinedRect.left = InputRect.left + (CombinedRect.left - OutputRect.left)
* SrcWidth / DstWidth;
- InputToCombinedRect.right = InputRect.left + (CombinedRect.right -
OutputRect.left) * SrcWidth / DstWidth;
- Ret = DibFunctionsForBitmapFormat[psoDest->iBitmapFormat].DIB_TransparentBlt(
- OutputObj, InputObj, &CombinedRect, &InputToCombinedRect,
ColorTranslation, iTransColor);
- }
- break;
- }
- case DC_COMPLEX:
- {
- ULONG Direction, i;
- RECT_ENUM RectEnum;
- BOOL EnumMore;
-
- if(OutputObj == InputObj)
- {
- if(OutputRect.top < InputRect.top)
- {
- Direction = OutputRect.left < (InputRect.left ? CD_RIGHTDOWN :
CD_LEFTDOWN);
- }
- else
- {
- Direction = OutputRect.left < (InputRect.left ? CD_RIGHTUP : CD_LEFTUP);
- }
- }
- else
- {
- Direction = CD_ANY;
- }
-
- CLIPOBJ_cEnumStart(Clip, FALSE, CT_RECTANGLES, Direction, 0);
- do
- {
- EnumMore = CLIPOBJ_bEnum(Clip, sizeof(RectEnum), (PVOID)&RectEnum);
- for (i = 0; i < RectEnum.c; i++)
- {
- RECTL ClipRect, CombinedRect;
- RECTL InputToCombinedRect;
-
- ClipRect.left = RectEnum.arcl[i].left + Translate.x;
- ClipRect.right = RectEnum.arcl[i].right + Translate.x;
- ClipRect.top = RectEnum.arcl[i].top + Translate.y;
- ClipRect.bottom = RectEnum.arcl[i].bottom + Translate.y;
- if (RECTL_bIntersectRect(&CombinedRect, &OutputRect, &ClipRect))
- {
- InputToCombinedRect.top = InputRect.top + (CombinedRect.top - OutputRect.top)
* SrcHeight / DstHeight;
- InputToCombinedRect.bottom = InputRect.top + (CombinedRect.bottom -
OutputRect.top) * SrcHeight / DstHeight;
- InputToCombinedRect.left = InputRect.left + (CombinedRect.left -
OutputRect.left) * SrcWidth / DstWidth;
- InputToCombinedRect.right = InputRect.left + (CombinedRect.right -
OutputRect.left) * SrcWidth / DstWidth;
-
- Ret =
DibFunctionsForBitmapFormat[psoDest->iBitmapFormat].DIB_TransparentBlt(
- OutputObj, InputObj, &CombinedRect, &InputToCombinedRect,
ColorTranslation, iTransColor);
- if(!Ret)
- {
- break;
- }
- }
- }
- } while(EnumMore && Ret);
- break;
- }
- default:
- {
- Ret = FALSE;
- break;
- }
- }
-
- IntEngLeave(&EnterLeaveDest);
- IntEngLeave(&EnterLeaveSource);
-
- return Ret;
+
+ return Ret;
}
-BOOL FASTCALL
-IntEngTransparentBlt(SURFOBJ *psoDest,
- SURFOBJ *psoSource,
- CLIPOBJ *Clip,
- XLATEOBJ *ColorTranslation,
- PRECTL DestRect,
- PRECTL SourceRect,
- ULONG iTransColor,
- ULONG Reserved)
+BOOL
+FASTCALL
+IntEngTransparentBlt(
+ SURFOBJ *psoDest,
+ SURFOBJ *psoSource,
+ CLIPOBJ *Clip,
+ XLATEOBJ *ColorTranslation,
+ PRECTL DestRect,
+ PRECTL SourceRect,
+ ULONG iTransColor,
+ ULONG Reserved)
{
- BOOL Ret;
- RECTL OutputRect, InputClippedRect;
- SURFACE *psurfDest;
- SURFACE *psurfSource;
- RECTL InputRect;
- LONG InputClWidth, InputClHeight, InputWidth, InputHeight;
-
- ASSERT(psoDest);
- ASSERT(psoSource);
- ASSERT(DestRect);
-
- psurfDest = CONTAINING_RECORD(psoDest, SURFACE, SurfObj);
- psurfSource = CONTAINING_RECORD(psoSource, SURFACE, SurfObj);
-
- ASSERT(psurfDest);
- ASSERT(psurfSource);
-
- /* If no clip object is given, use trivial one */
- if (!Clip) Clip = &gxcoTrivial.ClipObj;
-
- InputClippedRect = *DestRect;
- if(InputClippedRect.right < InputClippedRect.left)
- {
- InputClippedRect.left = DestRect->right;
- InputClippedRect.right = DestRect->left;
- }
- if(InputClippedRect.bottom < InputClippedRect.top)
- {
- InputClippedRect.top = DestRect->bottom;
- InputClippedRect.bottom = DestRect->top;
- }
-
- InputRect = *SourceRect;
- /* Clip against the bounds of the clipping region so we won't try to write
- * outside the surface */
- if (Clip->iDComplexity != DC_TRIVIAL)
- {
- if(!RECTL_bIntersectRect(&OutputRect, &InputClippedRect,
&Clip->rclBounds))
- {
- return TRUE;
- }
- /* Update source rect */
- InputClWidth = InputClippedRect.right - InputClippedRect.left;
- InputClHeight = InputClippedRect.bottom - InputClippedRect.top;
- InputWidth = InputRect.right - InputRect.left;
- InputHeight = InputRect.bottom - InputRect.top;
-
- InputRect.left += (InputWidth * (OutputRect.left - InputClippedRect.left)) /
InputClWidth;
- InputRect.right -= (InputWidth * (InputClippedRect.right - OutputRect.right)) /
InputClWidth;
- InputRect.top += (InputHeight * (OutputRect.top - InputClippedRect.top)) /
InputClHeight;
- InputRect.bottom -= (InputHeight * (InputClippedRect.bottom - OutputRect.bottom)) /
InputClHeight;
- }
- else
- {
- OutputRect = InputClippedRect;
- }
-
- if(psurfDest->flags & HOOK_TRANSPARENTBLT)
- {
- Ret = GDIDEVFUNCS(psoDest).TransparentBlt(
- psoDest, psoSource, Clip, ColorTranslation, &OutputRect,
- &InputRect, iTransColor, Reserved);
- }
- else
- Ret = FALSE;
-
- if(!Ret)
- {
- Ret = EngTransparentBlt(psoDest, psoSource, Clip, ColorTranslation,
- &OutputRect, &InputRect, iTransColor, Reserved);
- }
-
- return Ret;
+ BOOL Ret;
+ RECTL OutputRect, InputClippedRect;
+ SURFACE *psurfDest;
+ SURFACE *psurfSource;
+ RECTL InputRect;
+ LONG InputClWidth, InputClHeight, InputWidth, InputHeight;
+
+ ASSERT(psoDest);
+ ASSERT(psoSource);
+ ASSERT(DestRect);
+
+ psurfDest = CONTAINING_RECORD(psoDest, SURFACE, SurfObj);
+ psurfSource = CONTAINING_RECORD(psoSource, SURFACE, SurfObj);
+
+ ASSERT(psurfDest);
+ ASSERT(psurfSource);
+
+ /* If no clip object is given, use trivial one */
+ if (!Clip) Clip = &gxcoTrivial.ClipObj;
+
+ InputClippedRect = *DestRect;
+ if (InputClippedRect.right < InputClippedRect.left)
+ {
+ InputClippedRect.left = DestRect->right;
+ InputClippedRect.right = DestRect->left;
+ }
+ if (InputClippedRect.bottom < InputClippedRect.top)
+ {
+ InputClippedRect.top = DestRect->bottom;
+ InputClippedRect.bottom = DestRect->top;
+ }
+
+ InputRect = *SourceRect;
+ /* Clip against the bounds of the clipping region so we won't try to write
+ * outside the surface */
+ if (Clip->iDComplexity != DC_TRIVIAL)
+ {
+ if (!RECTL_bIntersectRect(&OutputRect, &InputClippedRect,
&Clip->rclBounds))
+ {
+ return TRUE;
+ }
+ /* Update source rect */
+ InputClWidth = InputClippedRect.right - InputClippedRect.left;
+ InputClHeight = InputClippedRect.bottom - InputClippedRect.top;
+ InputWidth = InputRect.right - InputRect.left;
+ InputHeight = InputRect.bottom - InputRect.top;
+
+ InputRect.left += (InputWidth * (OutputRect.left - InputClippedRect.left)) /
InputClWidth;
+ InputRect.right -= (InputWidth * (InputClippedRect.right - OutputRect.right)) /
InputClWidth;
+ InputRect.top += (InputHeight * (OutputRect.top - InputClippedRect.top)) /
InputClHeight;
+ InputRect.bottom -= (InputHeight * (InputClippedRect.bottom - OutputRect.bottom))
/ InputClHeight;
+ }
+ else
+ {
+ OutputRect = InputClippedRect;
+ }
+
+ if (psurfDest->flags & HOOK_TRANSPARENTBLT)
+ {
+ Ret = GDIDEVFUNCS(psoDest).TransparentBlt(psoDest,
+ psoSource,
+ Clip,
+ ColorTranslation,
+ &OutputRect,
+ &InputRect,
+ iTransColor,
+ Reserved);
+ }
+ else
+ Ret = FALSE;
+
+ if (!Ret)
+ {
+ Ret = EngTransparentBlt(psoDest,
+ psoSource,
+ Clip,
+ ColorTranslation,
+ &OutputRect,
+ &InputRect,
+ iTransColor,
+ Reserved);
+ }
+
+ return Ret;
}
/* EOF */