diff --git "a/win32ss/gdi/gdi32/objects/painting.c" "b/win32ss/gdi/gdi32/objects/painting.c" index 9790111e55b..d64061bb65e 100644 --- "a/win32ss/gdi/gdi32/objects/painting.c" +++ "b/win32ss/gdi/gdi32/objects/painting.c" @@ -1,5 +1,5 @@ #include - +#include /* * @implemented @@ -866,6 +866,44 @@ GdiGradientFill( _In_ ULONG nCount, _In_ ULONG ulMode) { + TRIVERTEX tv[260] = { 0 }; + GRADIENT_TRIANGLE gt[260] = { 0 }; + GRADIENT_RECT gr[260] = { 0 }; + static INT Index = 1; + + if (nVertex <= 260) + { + memcpy(tv, pVertex, sizeof(TRIVERTEX) * nVertex); + DPRINT1("Index is %d\n", Index++); + DPRINT1("GdiGradientFill. Vertices %d, Count %d, Mode %d\n", + nVertex, nCount, ulMode); + for (int x = 0; x < nVertex; x++) + { + DPRINT1("TV[%d] is x %d, y %d, R 0x%04x, G 0x%04x, B 0x%04x, A 0x%04x\n", + x, tv[x].x, tv[x].y, tv[x].Red, tv[x].Green, tv[x].Blue, tv[x].Alpha); + } + } + + if (nCount <= 260 && ulMode < 2) + { + memcpy(gr, pMesh, sizeof(GRADIENT_RECT) * nCount); + for (int x = 0; x < nCount; x++) + { + DPRINT1("GR[%d] UpperLeft %d, LowerRight %d\n", + x, gr[x].UpperLeft, gr[x].LowerRight); + } + } + + if (nCount <= 260 && ulMode == 2) + { + memcpy(gt, pMesh, sizeof(GRADIENT_TRIANGLE) * nCount); + for (int x = 0; x < nCount; x++) + { + DPRINT1("GT[%d] is Vertex1 %d, Vertex2 %d, Vertex3 %d\n", + x, gt[x].Vertex1, gt[x].Vertex2, gt[x].Vertex3); + } + } + if (GDI_HANDLE_GET_TYPE(hdc) == GDILoObjType_LO_METADC16_TYPE) return TRUE; HANDLE_EMETAFDC(BOOL, GradientFill, FALSE, hdc, pVertex, nVertex, pMesh, nCount, ulMode);