35 #include "wine/port.h" 57 0, 0, { (
DWORD_PTR)(__FILE__
": enhmetafile_cs") }
179 X(EMR_FORCEUFIMAPPING),
181 X(EMR_COLORCORRECTPALETTE),
182 X(EMR_SETICMPROFILEA),
183 X(EMR_SETICMPROFILEW),
186 X(EMR_TRANSPARENTBLT),
190 X(EMR_SETTEXTJUSTIFICATION),
191 X(EMR_COLORMATCHTOTARGETW),
192 X(EMR_CREATECOLORSPACEW)
222 if (
info->bmiHeader.biBitCount != 1)
return FALSE;
229 if ((
rgb->rgbtRed == 0) && (
rgb->rgbtGreen == 0) && (
rgb->rgbtBlue == 0))
233 return ((
rgb->rgbtRed == 0xff) && (
rgb->rgbtGreen == 0xff)
234 && (
rgb->rgbtBlue == 0xff));
243 if ((
rgb->rgbRed == 0) && (
rgb->rgbGreen == 0) &&
244 (
rgb->rgbBlue == 0) && (
rgb->rgbReserved == 0))
249 return ((
rgb->rgbRed == 0xff) && (
rgb->rgbGreen == 0xff)
250 && (
rgb->rgbBlue == 0xff) && (
rgb->rgbReserved == 0));
272 WARN(
"Invalid emf header type 0x%08x sig 0x%08x.\n",
276 if (filesize < emh->nBytes)
278 WARN(
"File truncated (got %u bytes, header says %u)\n", emh->
nBytes, filesize);
327 TRACE(
"hmf %p -> enhmetaObj %p\n", hmf, metaObj);
378 WARN(
"could not open %s\n", lpszMetaFile);
427 if(!emh)
return FALSE;
451 if(!emh)
return FALSE;
481 if(!emh)
return FALSE;
551 #define ENUM_GET_PRIVATE_DATA(ht) \ 552 ((enum_emh_data*)(((unsigned char*)(ht))-sizeof (enum_emh_data))) 554 #define WIDTH(rect) ( (rect).right - (rect).left ) 555 #define HEIGHT(rect) ( (rect).bottom - (rect).top ) 557 #define IS_WIN9X() (GetVersion()&0x80000000) 561 XFORM mapping_mode_trans, final_trans;
562 double scaleX, scaleY;
564 scaleX = (
double)
info->state.vportExtX / (
double)
info->state.wndExtX;
565 scaleY = (
double)
info->state.vportExtY / (
double)
info->state.wndExtY;
566 mapping_mode_trans.
eM11 = scaleX;
567 mapping_mode_trans.
eM12 = 0.0;
568 mapping_mode_trans.
eM21 = 0.0;
569 mapping_mode_trans.
eM22 = scaleY;
570 mapping_mode_trans.
eDx = (
double)
info->state.vportOrgX - scaleX * (
double)
info->state.wndOrgX;
571 mapping_mode_trans.
eDy = (
double)
info->state.vportOrgY - scaleY * (
double)
info->state.wndOrgY;
578 ERR(
"World transform failed!\n");
608 TRACE(
"save_level %d\n",
info->save_level);
621 switch(
info->state.mode)
624 info->state.wndExtX = 1;
625 info->state.wndExtY = 1;
626 info->state.vportExtX = 1;
627 info->state.vportExtY = 1;
631 info->state.wndExtX = horzSize * 10;
632 info->state.wndExtY = vertSize * 10;
633 info->state.vportExtX = horzRes;
634 info->state.vportExtY = -vertRes;
637 info->state.wndExtX = horzSize * 100;
638 info->state.wndExtY = vertSize * 100;
639 info->state.vportExtX = horzRes;
640 info->state.vportExtY = -vertRes;
643 info->state.wndExtX =
MulDiv(1000, horzSize, 254);
644 info->state.wndExtY =
MulDiv(1000, vertSize, 254);
645 info->state.vportExtX = horzRes;
646 info->state.vportExtY = -vertRes;
649 info->state.wndExtX =
MulDiv(10000, horzSize, 254);
650 info->state.wndExtY =
MulDiv(10000, vertSize, 254);
651 info->state.vportExtX = horzRes;
652 info->state.vportExtY = -vertRes;
655 info->state.wndExtX =
MulDiv(14400, horzSize, 254);
656 info->state.wndExtY =
MulDiv(14400, vertSize, 254);
657 info->state.vportExtX = horzRes;
658 info->state.vportExtY = -vertRes;
682 INT mincx = (
info->state.vportExtX >= 0) ? 1 : -1;
683 info->state.vportExtX =
floor(
info->state.vportExtX * ydim / xdim + 0.5);
684 if (!
info->state.vportExtX)
info->state.vportExtX = mincx;
688 INT mincy = (
info->state.vportExtY >= 0) ? 1 : -1;
689 info->state.vportExtY =
floor(
info->state.vportExtY * xdim / ydim + 0.5);
690 if (!
info->state.vportExtY)
info->state.vportExtY = mincy;
752 case EMR_SMALLTEXTOUT:
754 case EMR_TRANSPARENTBLT:
788 TRACE(
"hdc = %p, handletable = %p, record = %p, numHandles = %d\n",
790 if (!mr)
return FALSE;
812 if (
info->state.mode == pSetMapMode->
iMode &&
882 TRACE(
"EMR_INTERSECTCLIPRECT: rect %d,%d - %d, %d\n",
892 if( pSelectObject->
ihObject & 0x80000000 ) {
921 TRACE(
"SetWindowOrgEx: %d,%d\n",
info->state.wndOrgX,
info->state.wndOrgY);
939 TRACE(
"SetWindowExtEx: %d,%d\n",
info->state.wndExtX,
info->state.wndExtY);
952 TRACE(
"SetViewportOrgEx: %d,%d\n",
info->state.vportOrgX,
info->state.vportOrgY);
969 TRACE(
"SetViewportExtEx: %d,%d\n",
info->state.vportExtX,
info->state.vportExtY);
992 FIXME(
"EMR_EXTCREATEPEN: Need to copy brush bitmap\n");
1049 for(
i = 0;
i < pPoly->
cpts;
i++)
1065 for(
i = 0;
i < pPoly->
cpts;
i++)
1081 for(
i = 0;
i < pPoly->
cpts;
i++)
1097 for(
i = 0;
i < pPoly->
cpts;
i++)
1113 for(
i = 0;
i < pPoly->
cpts;
i++)
1131 for(
i = 0;
i < pPolyPoly->
cpts;
i++)
1149 for(
i = 0;
i < pPolyPoly->
cpts;
i++)
1173 for (
i = 0;
i < pPolyDraw16->
cpts; ++
i)
1175 pts[
i].
x = ptl[
i].
x;
1176 pts[
i].
y = ptl[
i].
y;
1189 pStretchDIBits->
xDest,
1190 pStretchDIBits->
yDest,
1193 pStretchDIBits->
xSrc,
1194 pStretchDIBits->
ySrc,
1195 pStretchDIBits->
cxSrc,
1196 pStretchDIBits->
cySrc,
1200 pStretchDIBits->
dwRop);
1215 TRACE(
"EMR_EXTTEXTOUTA: x,y = %d, %d. rect = %s. flags %08x\n",
1251 TRACE(
"EMR_EXTTEXTOUTW: x,y = %d, %d. rect = %s. flags %08x\n",
1290 if( lpSelectPal->
ihPal & 0x80000000 ) {
1334 info->state.world_transform = lpXfrm->
xform;
1453 FIXME(
"OffsetClipRgn\n");
1467 FIXME(
"ExcludeClipRect\n");
1478 if (!lpScaleViewportExtEx->
xNum || !lpScaleViewportExtEx->
xDenom ||
1479 !lpScaleViewportExtEx->
yNum || !lpScaleViewportExtEx->
yDenom)
1482 lpScaleViewportExtEx->
xDenom);
1484 lpScaleViewportExtEx->
yDenom);
1485 if (
info->state.vportExtX == 0)
info->state.vportExtX = 1;
1486 if (
info->state.vportExtY == 0)
info->state.vportExtY = 1;
1490 TRACE(
"EMRSCALEVIEWPORTEXTEX %d/%d %d/%d\n",
1491 lpScaleViewportExtEx->
xNum,lpScaleViewportExtEx->
xDenom,
1492 lpScaleViewportExtEx->
yNum,lpScaleViewportExtEx->
yDenom);
1506 if (!lpScaleWindowExtEx->
xNum || !lpScaleWindowExtEx->
xDenom ||
1507 !lpScaleWindowExtEx->
yNum || !lpScaleWindowExtEx->
yDenom)
1510 lpScaleWindowExtEx->
xDenom);
1512 lpScaleWindowExtEx->
yDenom);
1513 if (
info->state.wndExtX == 0)
info->state.wndExtX = 1;
1514 if (
info->state.wndExtY == 0)
info->state.wndExtY = 1;
1518 TRACE(
"EMRSCALEWINDOWEXTEX %d/%d %d/%d\n",
1519 lpScaleWindowExtEx->
xNum,lpScaleWindowExtEx->
xDenom,
1520 lpScaleWindowExtEx->
yNum,lpScaleWindowExtEx->
yDenom);
1532 switch(lpModifyWorldTrans->
iMode) {
1534 info->state.world_transform.eM11 =
info->state.world_transform.eM22 = 1;
1535 info->state.world_transform.eM12 =
info->state.world_transform.eM21 = 0;
1536 info->state.world_transform.eDx =
info->state.world_transform.eDy = 0;
1542 &
info->state.world_transform);
1548 &lpModifyWorldTrans->
xform);
1553 FIXME(
"Unknown imode %d\n", lpModifyWorldTrans->
iMode);
1832 ERR(
"Invalid EMR_CREATEDIBPATTERNBRUSHPT record\n");
1847 ((
const BYTE *)lpCreate) + lpCreate->offBmi,
1849 memcpy( ((
BYTE*)lpPackedStruct) + lpCreate->cbBmi,
1850 ((
const BYTE *)lpCreate) + lpCreate->offBits,
1855 (
UINT)lpCreate->iUsage );
1877 bm.bmWidth =
pbi->bmiHeader.biWidth;
1878 bm.bmHeight =
abs(
pbi->bmiHeader.biHeight);
1879 bm.bmWidthBytes = 4 * ((
pbi->bmiHeader.biWidth + 31) / 32);
1880 bm.bmPlanes =
pbi->bmiHeader.biPlanes;
1881 bm.bmBitsPixel =
pbi->bmiHeader.biBitCount;
1882 bm.bmBits = (
BYTE *)mr + pCreateMonoBrush->
offBits;
1916 HBRUSH hBrush, hBrushOld;
1917 HBITMAP hBmp = 0, hBmpOld = 0;
1949 TRACE(
"EMR_STRETCHBLT: %d, %d %dx%d -> %d, %d %dx%d. rop %08x offBitsSrc %d\n",
1956 pStretchBlt->
dwRop);
1959 HBRUSH hBrush, hBrushOld;
1960 HBITMAP hBmp = 0, hBmpOld = 0;
1980 pStretchBlt->
dwRop);
1989 case EMR_ALPHABLEND:
1993 TRACE(
"EMR_ALPHABLEND: %d, %d %dx%d -> %d, %d %dx%d. blendfn %08x offBitsSrc %d\n",
1999 FIXME(
"EMR_ALPHABLEND: offBmiSrc == 0\n");
2002 HBITMAP hBmp = 0, hBmpOld = 0;
2028 HBRUSH hBrush, hBrushOld;
2029 HBITMAP hBmp, hBmpOld, hBmpMask;
2076 HBRUSH hBrush, hBrushOld;
2077 HBITMAP hBmp, hBmpOld, hBmpMask;
2128 pSetDIBitsToDevice->
xDest,
2129 pSetDIBitsToDevice->
yDest,
2130 pSetDIBitsToDevice->
cxSrc,
2131 pSetDIBitsToDevice->
cySrc,
2132 pSetDIBitsToDevice->
xSrc,
2133 pSetDIBitsToDevice->
ySrc,
2135 pSetDIBitsToDevice->
cScans,
2147 XFORM xform, xformOld;
2188 XFORM xform, xformOld;
2266 case EMR_SETTEXTJUSTIFICATION:
2275 const EMRSETLAYOUT *pSetLayout = (
const EMRSETLAYOUT *)mr;
2280 case EMR_GRADIENTFILL:
2288 case EMR_DRAWESCAPE:
2302 case EMR_NAMEDESCAPE:
2305 INT rounded_size = (pemr->
cjIn+3) & ~3;
2313 case EMR_SMALLTEXTOUT:
2314 case EMR_FORCEUFIMAPPING:
2315 case EMR_COLORCORRECTPALETTE:
2316 case EMR_SETICMPROFILEA:
2317 case EMR_SETICMPROFILEW:
2318 case EMR_TRANSPARENTBLT:
2320 case EMR_COLORMATCHTOTARGETW:
2321 case EMR_CREATECOLORSPACEW:
2326 FIXME(
"type %d is unimplemented\n",
type);
2388 HBRUSH hBrush =
NULL;
2392 SIZE vp_size, win_size;
2393 POINT vp_org, win_org;
2394 INT mapMode =
MM_TEXT, old_align = 0, old_rop2 = 0, old_arcdir = 0, old_polyfill = 0, old_stretchblt = 0;
2395 COLORREF old_text_color = 0, old_bk_color = 0;
2417 info->state.wndOrgX = 0;
2418 info->state.wndOrgY = 0;
2419 info->state.wndExtX = 1;
2420 info->state.wndExtY = 1;
2421 info->state.vportOrgX = 0;
2422 info->state.vportOrgY = 0;
2423 info->state.vportExtX = 1;
2424 info->state.vportExtY = 1;
2425 info->state.world_transform.eM11 =
info->state.world_transform.eM22 = 1;
2426 info->state.world_transform.eM12 =
info->state.world_transform.eM21 = 0;
2427 info->state.world_transform.eDx =
info->state.world_transform.eDy = 0;
2430 info->save_level = 0;
2432 info->init_transform =
info->state.world_transform;
2435 ht->objectHandle[0] = hmf;
2472 double xscale, yscale;
2473 xscale = (
double)vp_size.
cx / (
double)win_size.
cx;
2474 yscale = (
double)vp_size.
cy / (
double)win_size.
cy;
2475 info->init_transform.eM11 = xscale;
2476 info->init_transform.eM12 = 0.0;
2477 info->init_transform.eM21 = 0.0;
2478 info->init_transform.eM22 = yscale;
2479 info->init_transform.eDx = (
double)vp_org.
x - xscale * (
double)win_org.
x;
2480 info->init_transform.eDy = (
double)vp_org.
y - yscale * (
double)win_org.
y;
2487 double xSrcPixSize, ySrcPixSize, xscale, yscale;
2500 TRACE(
"xscale = %f, yscale = %f\n", xscale, yscale);
2502 xform.
eM11 = xscale;
2505 xform.
eM22 = yscale;
2532 WARN(
"record truncated\n");
2573 if( (
ht->objectHandle)[
i] )
2576 while (
info->saved_state)
2579 info->saved_state =
info->saved_state->next;
2630 HENHMETAFILE hmfSrc,
2634 HENHMETAFILE hmfDst;
2636 if(!emrSrc)
return FALSE;
2655 ERR(
"Can't reopen emf for reading\n");
2672 HENHMETAFILE hmfSrc,
2676 HENHMETAFILE hmfDst;
2678 if(!emrSrc)
return FALSE;
2697 ERR(
"Can't reopen emf for reading\n");
2736 TRACE(
"copying 0x%08x palettes\n", dwNumPalToCopy );
2739 sizeof( *(
info->lpPe) ) * dwNumPalToCopy );
2743 info->cEntries = dwNumPalToCopy;
2767 if (!enhHeader)
return 0;
2778 infoForCallBack.
lpPe = lpPe;
2781 &infoForCallBack, 0 ) )
2785 if ( infoForCallBack.
lpPe !=
NULL )
2788 ERR(
"cbEnhPaletteCopy didn't execute correctly\n" );
2812 if (mf_size <
sizeof(*mh))
return NULL;
2825 chunks =
chunk->num_chunks;
2827 if (!emf_bits)
goto done;
2829 if (
chunk->chunk_size > remaining)
goto done;
2830 remaining -=
chunk->chunk_size;
2831 if (
chunk->remaining_size != remaining)
goto done;
2834 if (--chunks == 0)
break;
2867 static const WCHAR szDisplayW[] = {
'D',
'I',
'S',
'P',
'L',
'A',
'Y',
'\0' };
2868 HMETAFILE hmf =
NULL;
2872 LONG mm, xExt, yExt;
2873 INT horzsize, vertsize, horzres, vertres;
2875 TRACE(
"(%d, %p, %p, %p)\n", cbBuffer, lpbBuffer, hdcRef, lpmfp);
2880 WARN(
"SetMetaFileBitsEx failed\n");
2900 TRACE(
"lpmfp == NULL\n");
2910 if (xExt < 0 || yExt < 0)
2929 ERR(
"CreateEnhMetaFile failed\n");
2940 UINT mfcomment_size;
2942 mfcomment_size =
sizeof (*mfcomment) + cbBuffer;
2952 memcpy(&mfcomment[1], lpbBuffer, cbBuffer);
2973 xExt =
MulDiv(xExt, horzres, 100 * horzsize);
2974 yExt =
MulDiv(yExt, vertres, 100 * vertsize);
DWORD WINAPI SetMapperFlags(_In_ HDC, _In_ DWORD)
HGDIOBJ WINAPI GetStockObject(_In_ int)
DWORD WINAPI SetLayout(_In_ HDC hdc, _In_ DWORD dwLayout)
#define ERROR_INVALID_PARAMETER
#define EMR_SETPOLYFILLMODE
BOOL WINAPI ExtTextOutW(_In_ HDC hdc, _In_ int x, _In_ int y, _In_ UINT options, _In_opt_ const RECT *lprect, _In_reads_opt_(c) LPCWSTR lpString, _In_ UINT c, _In_reads_opt_(c) const INT *lpDx)
BOOL WINAPI PolyDraw(_In_ HDC hdc, _In_reads_(cpt) const POINT *apt, _In_reads_(cpt) const BYTE *aj, _In_ int cpt)
HMETAFILE WINAPI SetMetaFileBitsEx(_In_ UINT cbBuffer, _In_reads_bytes_(cbBuffer) CONST BYTE *lpData)
BOOL WINAPI WriteFile(IN HANDLE hFile, IN LPCVOID lpBuffer, IN DWORD nNumberOfBytesToWrite OPTIONAL, OUT LPDWORD lpNumberOfBytesWritten, IN LPOVERLAPPED lpOverlapped OPTIONAL)
struct _RGNDATAHEADER RGNDATAHEADER
int WINAPI StretchDIBits(_In_ HDC, _In_ int, _In_ int, _In_ int, _In_ int, _In_ int, _In_ int, _In_ int, _In_ int, _In_opt_ const VOID *, _In_ const BITMAPINFO *, _In_ UINT, _In_ DWORD)
#define EMR_SETARCDIRECTION
#define memmove(s1, s2, n)
BOOL WINAPI SetViewportOrgEx(_In_ HDC, _In_ int, _In_ int, _Out_opt_ LPPOINT)
#define EMR_SETMITERLIMIT
#define EMR_POLYBEZIERTO16
BOOL WINAPI GdiAlphaBlend(HDC hdcDst, int xDst, int yDst, int widthDst, int heightDst, HDC hdcSrc, int xSrc, int ySrc, int widthSrc, int heightSrc, BLENDFUNCTION blendFunction)
BOOL WINAPI SetWindowExtEx(_In_ HDC, _In_ int, _In_ int, _Out_opt_ LPSIZE)
int WINAPI FillRgn(_In_ HDC, _In_ HRGN, _In_ HBRUSH)
GLubyte GLubyte GLubyte GLubyte w
HBITMAP WINAPI CreateBitmapIndirect(_In_ const BITMAP *pbm)
HCOLORSPACE WINAPI SetColorSpace(_In_ HDC, _In_ HCOLORSPACE)
static struct object_header ** handles
#define WideCharToMultiByte
BOOL WINAPI PaintRgn(_In_ HDC, _In_ HRGN)
BOOL Polygon(CONST PPOINT UnsafePoints, int Count, int polyFillMode)
HGDIOBJ alloc_gdi_handle(void *obj, WORD type, const struct gdi_obj_funcs *funcs) DECLSPEC_HIDDEN
BOOL WINAPI LPtoDP(_In_ HDC hdc, _Inout_updates_(c) LPPOINT lppt, _In_ int c)
BOOL WINAPI Rectangle(_In_ HDC, _In_ int, _In_ int, _In_ int, _In_ int)
BOOL WINAPI GetWindowOrgEx(_In_ HDC, _Out_ LPPOINT)
#define EMR_STROKEANDFILLPATH
#define EMR_EXCLUDECLIPRECT
#define EMR_STRETCHDIBITS
BOOL WINAPI EndPath(_In_ HDC)
#define ERROR_INVALID_HANDLE
#define EMR_CREATECOLORSPACE
BOOL WINAPI SetMiterLimit(_In_ HDC, _In_ FLOAT, _Out_opt_ PFLOAT)
BOOL WINAPI SelectClipPath(_In_ HDC, _In_ int)
INT WINAPI NamedEscape(HDC hdc, PWCHAR pDriver, INT iEsc, INT cjIn, LPSTR pjIn, INT cjOut, LPSTR pjOut)
#define EMR_DELETECOLORSPACE
int WINAPI IntersectClipRect(_In_ HDC, _In_ int, _In_ int, _In_ int, _In_ int)
HGDIOBJ WINAPI SelectObject(_In_ HDC, _In_ HGDIOBJ)
#define ERROR_NOT_ENOUGH_MEMORY
#define INVALID_HANDLE_VALUE
BOOL WINAPI DeleteObject(_In_ HGDIOBJ)
BOOL WINAPI Chord(_In_ HDC hdc, _In_ INT xLeft, _In_ INT yTop, _In_ INT xRight, _In_ INT yBottom, _In_ INT xRadial1, _In_ INT yRadial1, _In_ INT xRadial2, _In_ INT yRadial2)
BOOL WINAPI LineTo(_In_ HDC, _In_ int, _In_ int)
#define EMR_SETPALETTEENTRIES
HDC WINAPI CreateCompatibleDC(_In_opt_ HDC hdc)
#define EMR_CREATEPALETTE
PALETTEENTRY aPalEntries[1]
HDC WINAPI CreateEnhMetaFileW(_In_opt_ HDC, _In_opt_ LPCWSTR, _In_opt_ LPCRECT, _In_opt_ LPCWSTR)
#define EMR_SETBRUSHORGEX
UINT WINAPI SetTextAlign(_In_ HDC, _In_ UINT)
INT WINAPI MulDiv(INT nNumber, INT nNumerator, INT nDenominator)
void WINAPI EnterCriticalSection(LPCRITICAL_SECTION)
BOOL WINAPI PolylineTo(_In_ HDC hdc, _In_reads_(cpt) const POINT *apt, _In_ DWORD cpt)
GLenum GLuint GLsizei bufsize
#define EMR_EXTCREATEFONTINDIRECTW
BOOL WINAPI PolyTextOutW(_In_ HDC hdc, _In_reads_(nstrings) const POLYTEXTW *ppt, _In_ int nstrings)
#define EMR_SELECTPALETTE
BOOL WINAPI DeleteColorSpace(_In_ HCOLORSPACE)
GLenum GLint GLenum GLsizei GLsizei GLsizei GLint GLsizei const GLvoid * bits
BOOL WINAPI PolyTextOutA(_In_ HDC hdc, _In_reads_(nstrings) const POLYTEXTA *ppt, _In_ int nstrings)
BOOL WINAPI StretchBlt(_In_ HDC, _In_ int, _In_ int, _In_ int, _In_ int, _In_opt_ HDC, _In_ int, _In_ int, _In_ int, _In_ int, _In_ DWORD)
#define EMR_SETCOLORSPACE
BOOL WINAPI SetPixelFormat(_In_ HDC, _In_ int, _In_ const PIXELFORMATDESCRIPTOR *)
BOOL WINAPI SetWorldTransform(_In_ HDC, _In_ const XFORM *)
#define AD_COUNTERCLOCKWISE
#define EMR_SETVIEWPORTORGEX
int(CALLBACK * ENHMFENUMPROC)(_In_ HDC hdc, _In_reads_(nHandles) HANDLETABLE FAR *lpht, _In_ CONST ENHMETARECORD *lpmr, _In_ int nHandles, _In_opt_ LPARAM data)
#define EMR_REALIZEPALETTE
COLORREF WINAPI SetBkColor(_In_ HDC, _In_ COLORREF)
void GDI_ReleaseObj(HGDIOBJ) DECLSPEC_HIDDEN
#define EMR_SETSTRETCHBLTMODE
BOOL WINAPI PatBlt(_In_ HDC, _In_ int, _In_ int, _In_ int, _In_ int, _In_ DWORD)
GLenum GLuint GLenum GLsizei const GLchar * buf
BOOL WINAPI MoveToEx(_In_ HDC, _In_ int, _In_ int, _Out_opt_ LPPOINT)
int WINAPI ExtSelectClipRgn(_In_ HDC, _In_opt_ HRGN, _In_ int)
int WINAPI SetBkMode(_In_ HDC, _In_ int)
BOOL WINAPI PlgBlt(_In_ HDC hdcDest, _In_reads_(3) const POINT *lpPoint, _In_ HDC hdcSrc, _In_ int xSrc, _In_ int ySrc, _In_ int width, _In_ int height, _In_opt_ HBITMAP hbmMask, _In_ int xMask, _In_ int yMask)
BOOL WINAPI ResizePalette(_In_ HPALETTE, _In_ UINT)
BOOL WINAPI PolyBezierTo(_In_ HDC hdc, _In_reads_(cpt) const POINT *apt, _In_ DWORD cpt)
#define EMR_INTERSECTCLIPRECT
#define GDICOMMENT_IDENTIFIER
BOOL WINAPI RoundRect(_In_ HDC, _In_ int, _In_ int, _In_ int, _In_ int, _In_ int, _In_ int)
int WINAPI SetMapMode(_In_ HDC, _In_ int)
BOOL WINAPI Arc(_In_ HDC hdc, _In_ INT xLeft, _In_ INT yTop, _In_ INT xRight, _In_ INT yBottom, _In_ INT xStartArc, _In_ INT yStartArc, _In_ INT xEndArc, _In_ INT yEndArc)
int WINAPI SetROP2(_In_ HDC, _In_ int)
int WINAPI OffsetClipRgn(_In_ HDC, _In_ int, _In_ int)
static struct _test_info info[]
BOOL WINAPI StrokeAndFillPath(_In_ HDC)
struct tagEMRESCAPE * PEMRNAMEDESCAPE
static const char mbstate_t *static wchar_t const char mbstate_t *static const wchar_t int *static double
HPALETTE WINAPI SelectPalette(_In_ HDC, _In_ HPALETTE, _In_ BOOL)
HFONT WINAPI CreateFontIndirectW(_In_ const LOGFONTW *)
BOOL WINAPI StrokePath(_In_ HDC)
BOOL WINAPI SetBrushOrgEx(_In_ HDC, _In_ int, _In_ int, _Out_opt_ LPPOINT)
_Inout_ PERBANDINFO * pbi
EMF_dc_state * saved_state
BOOL WINAPI CombineTransform(_Out_ LPXFORM pxformResult, _In_ const XFORM *pxform1, _In_ const XFORM *pxform2)
#define EMR_SETMAPPERFLAGS
int WINAPI SetArcDirection(_In_ HDC, _In_ int)
BOOL WINAPI SetColorAdjustment(_In_ HDC, _In_ const COLORADJUSTMENT *)
HRGN WINAPI CreateRectRgn(_In_ int, _In_ int, _In_ int, _In_ int)
#define EMR_MODIFYWORLDTRANSFORM
HBRUSH WINAPI CreatePatternBrush(_In_ HBITMAP)
#define EMR_CREATEDIBPATTERNBRUSHPT
struct EMF_dc_state * next
GLboolean GLboolean GLboolean b
BOOL WINAPI GetWorldTransform(_In_ HDC, _Out_ LPXFORM)
BOOL WINAPI PolyPolygon(_In_ HDC hdc, _In_ const POINT *apt, _In_reads_(csz) const INT *asz, _In_ int csz)
PVOID WINAPI HeapAlloc(HANDLE, DWORD, SIZE_T)
HCOLORSPACE WINAPI CreateColorSpaceA(_In_ LPLOGCOLORSPACEA pLogColorSpace)
BOOL WINAPI SetTextJustification(_In_ HDC, _In_ int, _In_ int)
BOOL WINAPI GetViewportExtEx(_In_ HDC, _Out_ LPSIZE)
BOOL WINAPI Pie(_In_ HDC, _In_ int, _In_ int, _In_ int, _In_ int, _In_ int, _In_ int, _In_ int, _In_ int)
int WINAPI SetPolyFillMode(_In_ HDC, _In_ int)
BOOL WINAPI ModifyWorldTransform(_In_ HDC, _In_opt_ const XFORM *, _In_ DWORD)
HPALETTE WINAPI CreatePalette(_In_reads_(_Inexpressible_(2 *sizeof(WORD)+plpal->palNumEntries *sizeof(PALETTEENTRY))) const LOGPALETTE *)
BOOL WINAPI GetWindowExtEx(_In_ HDC, _Out_ LPSIZE)
BOOL WINAPI WidenPath(_In_ HDC)
const char * wine_dbgstr_rect(const RECT *rect)
int WINAPI ChoosePixelFormat(_In_ HDC hdc, _In_ const PIXELFORMATDESCRIPTOR *ppfd)
BOOL WINAPI GdiComment(_In_ HDC hdc, _In_ UINT nSize, _In_reads_bytes_(nSize) const BYTE *lpData)
BOOL WINAPI GetViewportOrgEx(_In_ HDC, _Out_ LPPOINT)
#define EMR_SCALEWINDOWEXTEX
DWORD WINAPI GetFileSize(HANDLE hFile, LPDWORD lpFileSizeHigh)
int WINAPI SetMetaRgn(_In_ HDC)
#define EMR_CREATEBRUSHINDIRECT
#define EMR_SELECTCLIPPATH
GLint GLenum GLsizei GLsizei GLsizei GLint GLsizei const GLvoid * data
HENHMETAFILE WINAPI CloseEnhMetaFile(_In_ HDC hdc)
_In_ UINT _In_ UINT cEntries
COLORADJUSTMENT ColorAdjustment
HBITMAP WINAPI CreateDIBitmap(_In_ HDC hdc, _In_opt_ const BITMAPINFOHEADER *pbmih, _In_ DWORD fdwInit, _In_opt_ const VOID *pvInit, _In_opt_ const BITMAPINFO *pbmi, _In_ UINT uUsage)
static const unsigned char enhmetafile[]
int WINAPI GetDeviceCaps(_In_opt_ HDC, _In_ int)
#define memcpy(s1, s2, n)
int WINAPI GetMapMode(_In_ HDC)
static cab_ULONG checksum(const cab_UBYTE *data, cab_UWORD bytes, cab_ULONG csum)
LIST_ENTRY ProcessLocksList
HPEN WINAPI CreatePenIndirect(_In_ const LOGPEN *)
#define ENHMETA_SIGNATURE
GLint GLint GLsizei GLsizei height
BOOL WINAPI PolyPolyline(_In_ HDC hdc, _In_ const POINT *apt, _In_reads_(csz) const DWORD *asz, _In_ DWORD csz)
HBRUSH WINAPI CreateBrushIndirect(_In_ const LOGBRUSH *plb)
int WINAPI SetStretchBltMode(_In_ HDC, _In_ int)
#define EMR_SCALEVIEWPORTEXTEX
#define EMR_SETWINDOWEXTEX
_Check_return_ _CRT_JIT_INTRINSIC double __cdecl fabs(_In_ double x)
#define ERROR_INVALID_DATA
struct tagEMRCREATECOLORSPACE * PEMRCREATECOLORSPACE
COLORREF WINAPI SetTextColor(_In_ HDC, _In_ COLORREF)
HRGN WINAPI ExtCreateRegion(_In_opt_ const XFORM *lpx, _In_ DWORD nCount, _In_reads_bytes_(nCount) const RGNDATA *lpData)
#define EMR_SETCOLORADJUSTMENT
int WINAPI SetDIBitsToDevice(_In_ HDC, _In_ int, _In_ int, _In_ DWORD, _In_ DWORD, _In_ int, _In_ int, _In_ UINT, _In_ UINT, _In_ CONST VOID *, _In_ CONST BITMAPINFO *, _In_ UINT)
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 EMR_POLYPOLYGON16
_In_ ULONG _In_ ULONG rgb
BOOL WINAPI DeleteDC(_In_ HDC)
BOOL WINAPI Ellipse(_In_ HDC, _In_ int, _In_ int, _In_ int, _In_ int)
int WINAPI ExcludeClipRect(_In_ HDC, _In_ int, _In_ int, _In_ int, _In_ int)
static BOOL is_meta_dc(HDC hdc)
HBITMAP WINAPI CreateDIBSection(HDC hDC, CONST BITMAPINFO *BitmapInfo, UINT Usage, VOID **Bits, HANDLE hSection, DWORD dwOffset)
UINT WINAPI SetPaletteEntries(_In_ HPALETTE hpal, _In_ UINT iStart, _In_ UINT cEntries, _In_reads_(cEntries) CONST PALETTEENTRY *pPalEntries)
static const struct newhuff ht[]
BOOL WINAPI GdiGradientFill(HDC hdc, TRIVERTEX *vert_array, ULONG nvert, void *grad_array, ULONG ngrad, ULONG mode)
int WINAPI SaveDC(_In_ HDC)
HBRUSH WINAPI CreateSolidBrush(_In_ COLORREF)
BOOL WINAPI InvertRgn(_In_ HDC, _In_ HRGN)
BOOL WINAPI ExtTextOutA(_In_ HDC hdc, _In_ int x, _In_ int y, _In_ UINT options, _In_opt_ const RECT *lprect, _In_reads_opt_(c) LPCSTR lpString, _In_ UINT c, _In_reads_opt_(c) const INT *lpDx)
BOOL WINAPI PolyBezier(_In_ HDC hdc, _In_reads_(cpt) const POINT *apt, _In_ DWORD cpt)
BOOL WINAPI AbortPath(_In_ HDC hdc)
HDC WINAPI CreateDCW(_In_opt_ LPCWSTR pszDriver, _In_opt_ LPCWSTR pszDevice, _In_opt_ LPCWSTR psz, _In_opt_ const DEVMODEW *pdmInit)
static DWORD *static HFONT(WINAPI *pCreateFontIndirectExA)(const ENUMLOGFONTEXDVA *)
#define EMR_GLSBOUNDEDRECORD
BOOL WINAPI BeginPath(_In_ HDC hdc)
BOOL WINAPI Polyline(_In_ HDC hdc, _In_reads_(cpt) const POINT *apt, _In_ int cpt)
int WINAPI SetICMMode(_In_ HDC, _In_ int)
BOOL WINAPI FlattenPath(_In_ HDC)
int WINAPI DrawEscape(_In_ HDC hdc, _In_ int iEscape, _In_ int cjIn, _In_reads_bytes_opt_(cjIn) LPCSTR lpIn)
#define EMR_SETWORLDTRANSFORM
BOOL WINAPI SetWindowOrgEx(_In_ HDC, _In_ int, _In_ int, _Out_opt_ LPPOINT)
void * free_gdi_handle(HGDIOBJ handle) DECLSPEC_HIDDEN
BOOL WINAPI DeleteMetaFile(_In_ HMETAFILE)
void * GDI_GetObjPtr(HGDIOBJ, WORD) DECLSPEC_HIDDEN
BOOL WINAPI MaskBlt(_In_ HDC, _In_ int, _In_ int, _In_ int, _In_ int, _In_ HDC, _In_ int, _In_ int, _In_ HBITMAP, _In_ int, _In_ int, _In_ DWORD)
#define EMR_SETVIEWPORTEXTEX
HPEN WINAPI ExtCreatePen(_In_ DWORD iPenStyle, _In_ DWORD cWidth, _In_ const LOGBRUSH *plbrush, _In_ DWORD cStyle, _In_reads_opt_(cStyle) const DWORD *pstyle)
int WINAPI GetClipRgn(_In_ HDC, _In_ HRGN)
#define EMR_POLYPOLYLINE16
GLuint GLuint GLsizei GLenum type
static IPrintDialogCallback callback
#define EMR_SETDIBITSTODEVICE
#define EMR_SETWINDOWORGEX
BOOL WINAPI SetViewportExtEx(_In_ HDC, _In_ int, _In_ int, _Out_opt_ LPSIZE)
#define GDICOMMENT_WINDOWS_METAFILE
void WINAPI LeaveCriticalSection(LPCRITICAL_SECTION)
#define CreateFileA(a, b, c, d, e, f, g)
GLboolean GLboolean GLboolean GLboolean a
BOOL WINAPI SetPixelV(_In_ HDC, _In_ int, _In_ int, _In_ COLORREF)
BOOL WINAPI FillPath(_In_ HDC)
_Check_return_ _CRTIMP double __cdecl floor(_In_ double x)
struct tagEMRESCAPE * PEMRESCAPE
int WINAPI SetGraphicsMode(_In_ HDC, _In_ int)
HBRUSH WINAPI CreateDIBPatternBrushPt(_In_ const VOID *pvPackedDIB, _In_ UINT uUsage)
BOOL WINAPI RestoreDC(_In_ HDC, _In_ int)
#define EMR_RESIZEPALETTE
BOOL WINAPI CloseFigure(_In_ HDC hdc)
int WINAPI SetDIBits(_In_opt_ HDC, _In_ HBITMAP, _In_ UINT, _In_ UINT, _In_ CONST VOID *, _In_ CONST BITMAPINFO *, _In_ UINT)
BOOL WINAPI FrameRgn(_In_ HDC, _In_ HRGN, _In_ HBRUSH, _In_ int, _In_ int)
#define HeapFree(x, y, z)
UINT WINAPI RealizePalette(_In_ HDC)
#define EMR_EXTSELECTCLIPRGN
BOOL WINAPI PlayMetaFile(_In_ HDC, _In_ HMETAFILE)