27#define expect(expected, got) ok(got == expected, "Expected %.8x, got %.8x\n", expected, got)
28#define expectf_(expected, got, precision) ok(fabs((expected) - (got)) <= (precision), "Expected %f, got %f\n", (expected), (got))
29#define expectf(expected, got) expectf_((expected), (got), 0.001)
41 unsigned int flags,
unsigned int dataSize,
const unsigned char *pStr);
60 "%s.%i: Expected record type 0x%x, got 0x%x. Expected flags %#x, got %#x.\n",
desc,
count,
67 "%s.%i: Expected record type 0x%x, got 0x%x.\n",
desc,
count,
132 "%s: EMF+ record datasize %u and size %u mismatch\n",
state->desc,
record->DataSize,
record->Size);
135 "%s: EMF+ record truncated\n",
state->desc);
140 if (
state->expected[
state->count].record_type)
154 ok(0,
"%s: Unexpected EMF+ 0x%x record\n",
state->desc,
record->Type);
164 ok(hemf !=
NULL,
"%s: SetEnhMetaFileBits failed\n",
state->desc);
180 if (
state->expected[
state->count].record_type)
192 ok(0,
"%s: Unexpected EMF 0x%x record\n",
state->desc, lpEMFR->
iType);
213 unsigned int dataSize,
const unsigned char *pStr,
void *userdata)
223 ok(pStr ==
NULL,
"non-NULL pStr\n");
225 if (
state->expected[
state->count].record_type)
233 ok(0,
"%s: Unexpected EMF 0x%x record\n",
state->desc, record_type);
270 unsigned int dataSize,
const unsigned char *pStr,
void *userdata)
275 if (
state->expected[
state->count].record_type)
289 ok(
state->expected[
state->count].record_type == record_type,
290 "%s.%i: expected record type 0x%x, got 0x%x\n",
state->desc,
state->count,
291 state->expected[
state->count].record_type, record_type);
297 ok(0,
"%s: unexpected record 0x%x\n",
state->desc, record_type);
377 HENHMETAFILE hemf,
dummy;
379 static const GpRectF frame = {0.0, 0.0, 100.0, 100.0};
380 static const GpPointF dst_points[3] = {{0.0,0.0},{100.0,0.0},{0.0,100.0}};
446 ok(
header.Version == 0xdbc01001 ||
header.Version == 0xdbc01002,
"Unexpected version %x\n",
header.Version);
466 expectf_(100.0,
U(
header).EmfHeader.rclFrame.right * xres / 2540.0, 2.0);
467 expectf_(100.0,
U(
header).EmfHeader.rclFrame.bottom * yres / 2540.0, 2.0);
485 ok(
header.Version == 0xdbc01001 ||
header.Version == 0xdbc01002,
"Unexpected version %x\n",
header.Version);
505 expectf_(100.0,
U(
header).EmfHeader.rclFrame.right * xres / 2540.0, 2.0);
506 expectf_(100.0,
U(
header).EmfHeader.rclFrame.bottom * yres / 2540.0, 2.0);
532 ok(
header.Version == 0xdbc01001 ||
header.Version == 0xdbc01002,
"Unexpected version %x\n",
header.Version);
552 expectf_(100.0,
U(
header).EmfHeader.rclFrame.right * xres / 2540.0, 2.0);
553 expectf_(100.0,
U(
header).EmfHeader.rclFrame.bottom * yres / 2540.0, 2.0);
581 static const GpRectF frame = {0.0, 0.0, 100.0, 100.0};
582 static const GpPointF dst_points[3] = {{0.0,0.0},{100.0,0.0},{0.0,100.0}};
583 static const GpPointF dst_points_half[3] = {{0.0,0.0},{50.0,0.0},{0.0,50.0}};
694 ok(
ret != 0,
"Failed to delete enhmetafile %p\n", hemf);
740 static const GpRectF frame = {0.0, 0.0, 100.0, 100.0};
741 static const GpPointF dst_points[3] = {{0.0,0.0},{100.0,0.0},{0.0,100.0}};
765 ok(
header.Version == 0xdbc01001 ||
header.Version == 0xdbc01002,
"Unexpected version %x\n",
header.Version);
841 expectf_(100.0,
U(
header).EmfHeader.rclFrame.right * xres / 2540.0, 2.0);
842 expectf_(100.0,
U(
header).EmfHeader.rclFrame.bottom * yres / 2540.0, 2.0);
937 expectf_(100.0,
U(
header).EmfHeader.rclFrame.right * xres / 2540.0, 2.0);
938 expectf_(100.0,
U(
header).EmfHeader.rclFrame.bottom * yres / 2540.0, 2.0);
984 expectf_(100.0,
U(
header).EmfHeader.rclFrame.right * xres / 2540.0, 2.0);
985 expectf_(100.0,
U(
header).EmfHeader.rclFrame.bottom * yres / 2540.0, 2.0);
1036 static const GpRectF frame = {0.0, 0.0, 100.0, 100.0};
1037 static const GpPointF dst_points[3] = {{0.0,0.0},{100.0,0.0},{0.0,100.0}};
1038 static const GpPointF dst_points_half[3] = {{0.0,0.0},{50.0,0.0},{0.0,50.0}};
1150 static const GpRectF frame = {0.0, 0.0, 100.0, 100.0};
1151 static const GpPointF dst_points[3] = {{10.0,10.0},{20.0,10.0},{10.0,20.0}};
1226 HBRUSH
hbrush, holdbrush;
1246 "expected 1.0, got %f\n", bounds.
Width);
1248 "expected 1.0, got %f\n", bounds.
Height);
1268 "expected 1.0, got %f\n", bounds.
Width);
1270 "expected 1.0, got %f\n", bounds.
Height);
1357 static const GpRectF frame = {0.0, 0.0, 5.0, 5.0};
1358 static const GpPointF dst_points[3] = {{0.0,0.0},{100.0,0.0},{0.0,100.0}};
1562 static const GpRectF frame = {0.0, 0.0, 5.0, 5.0};
1563 static const GpPointF dst_points[3] = {{0.0,0.0},{100.0,0.0},{0.0,100.0}};
1820 static const GpRectF frame = {0.0, 0.0, 100.0, 100.0};
1830 if(!pGdipConvertToEmfPlus)
1833 win_skip(
"GDIPlus version 1.1 not available\n");
1900 static const GpRectF frame = {0.0, 0.0, 5.0, 5.0};
1922 "expected 1.0, got %f\n", bounds.
Width);
1924 "expected 1.0, got %f\n", bounds.
Height);
1935 "expected 1.0, got %f\n", bounds.
Width);
1937 "expected 1.0, got %f\n", bounds.
Height);
1995 static const GpRectF frame = {0.0, 0.0, 100.0, 100.0};
1996 static const GpPointF dst_points[3] = {{0.0,0.0},{100.0,0.0},{0.0,100.0}};
2086 srcrect.
Width = 1.0;
2091 dstrect.
Width = 5.0;
2191 static const GpRectF frame = {0.0, 0.0, 100.0, 100.0};
2192 static const GpPointF dst_points[3] = {{0.0,0.0},{100.0,0.0},{0.0,100.0}};
2214 ok(
rect.X == -0x400000,
"rect.X = %f\n",
rect.X);
2215 ok(
rect.Y == -0x400000,
"rect.Y = %f\n",
rect.Y);
2216 ok(
rect.Width == 0x800000,
"rect.Width = %f\n",
rect.Width);
2217 ok(
rect.Height == 0x800000,
"rect.Height = %f\n",
rect.Height);
2226 ok(
rect.Width == 10,
"rect.Width = %f\n",
rect.Width);
2227 ok(
rect.Height == 10,
"rect.Height = %f\n",
rect.Height);
2300 unsigned int flags,
unsigned int dataSize,
const unsigned char *pStr)
2302 static const XFORM xform = {0.5, 0, 0, 0.5, 0, 0};
2303 static const RECTL rectangle = {0,0,100,100};
2332 static const GpRectF frame = {0.0, 0.0, 100.0, 100.0};
2333 static const GpPointF dst_points[3] = {{0.0,0.0},{40.0,0.0},{0.0,40.0}};
2335 HBRUSH
hbrush, holdbrush;
2356 ok(
header.Version == 0xdbc01001 ||
header.Version == 0xdbc01002,
"Unexpected version %x\n",
header.Version);
2462 static const GpPointF dst_points[3] = {{10.0,10.0},{85.0,15.0},{10.0,80.0}};
2463 static const GpRectF frame = {0.0, 0.0, 100.0, 100.0};
2465 {2.0,0.0,0.0,0.0,0.0},
2466 {0.0,1.0,0.0,0.0,0.0},
2467 {0.0,0.0,1.0,0.0,0.0},
2468 {0.0,0.0,0.0,1.0,0.0},
2469 {0.0,0.0,0.0,0.0,1.0}}};
2490 info.bmiHeader.biWidth = 10;
2491 info.bmiHeader.biHeight = 10;
2492 info.bmiHeader.biPlanes = 1;
2493 info.bmiHeader.biBitCount = 32;
2551 win_skip(
"draw image metafile records tests skipped\n");
2577 static const GpRectF frame = {0.0, 0.0, 100.0, 100.0};
2655 static const GpRectF frame = {0.0, 0.0, 100.0, 100.0};
2720 static const GpRectF frame = {0.0, 0.0, 100.0, 100.0};
2721 static const WCHAR winetestemfW[] = {
'w',
'i',
'n',
'e',
't',
'e',
's',
't',
'.',
'e',
'm',
'f',0};
std::map< E_MODULE, HMODULE > mod
int CDECL _controlfp_s(unsigned int *cur, unsigned int newval, unsigned int mask)
int strcmp(const char *String1, const char *String2)
int memcmp(void *Buffer1, void *Buffer2, ACPI_SIZE Count)
#define check_record(rec,...)
#define GetProcAddress(x, y)
GpStatus WINGDIPAPI GdipDeleteBrush(GpBrush *brush)
GpStatus WINGDIPAPI GdipCreateSolidFill(ARGB color, GpSolidFill **sf)
GpStatus WINGDIPAPI GdipGetDpiX(GpGraphics *graphics, REAL *dpi)
GpStatus WINGDIPAPI GdipBeginContainer(GpGraphics *graphics, GDIPCONST GpRectF *dstrect, GDIPCONST GpRectF *srcrect, GpUnit unit, GraphicsContainer *state)
GpStatus WINGDIPAPI GdipCreateFromHDC(HDC hdc, GpGraphics **graphics)
GpStatus WINGDIPAPI GdipFillRectangleI(GpGraphics *graphics, GpBrush *brush, INT x, INT y, INT width, INT height)
GpStatus WINGDIPAPI GdipGetDpiY(GpGraphics *graphics, REAL *dpi)
GpStatus WINGDIPAPI GdipDeleteGraphics(GpGraphics *graphics)
GpStatus WINGDIPAPI GdipScaleWorldTransform(GpGraphics *graphics, REAL sx, REAL sy, GpMatrixOrder order)
GpStatus WINGDIPAPI GdipRotateWorldTransform(GpGraphics *graphics, REAL angle, GpMatrixOrder order)
GpStatus WINGDIPAPI GdipTranslateWorldTransform(GpGraphics *graphics, REAL dx, REAL dy, GpMatrixOrder order)
GpStatus WINGDIPAPI GdipSetCompositingMode(GpGraphics *graphics, CompositingMode mode)
GpStatus WINGDIPAPI GdipGetDC(GpGraphics *graphics, HDC *hdc)
GpStatus WINGDIPAPI GdipGetPageScale(GpGraphics *graphics, REAL *scale)
GpStatus WINGDIPAPI GdipGraphicsClear(GpGraphics *graphics, ARGB color)
GpStatus WINGDIPAPI GdipSetTextRenderingHint(GpGraphics *graphics, TextRenderingHint hint)
GpStatus WINGDIPAPI GdipSetWorldTransform(GpGraphics *graphics, GpMatrix *matrix)
GpStatus WINGDIPAPI GdipSetClipRegion(GpGraphics *graphics, GpRegion *region, CombineMode mode)
GpStatus WINGDIPAPI GdipMultiplyWorldTransform(GpGraphics *graphics, GDIPCONST GpMatrix *matrix, GpMatrixOrder order)
GpStatus WINGDIPAPI GdipSetClipRect(GpGraphics *graphics, REAL x, REAL y, REAL width, REAL height, CombineMode mode)
GpStatus WINGDIPAPI GdipGetVisibleClipBounds(GpGraphics *graphics, GpRectF *rect)
GpStatus WINGDIPAPI GdipDrawLineI(GpGraphics *graphics, GpPen *pen, INT x1, INT y1, INT x2, INT y2)
GpStatus WINGDIPAPI GdipSaveGraphics(GpGraphics *graphics, GraphicsState *state)
GpStatus WINGDIPAPI GdipDrawPath(GpGraphics *graphics, GpPen *pen, GpPath *path)
GpStatus WINGDIPAPI GdipEndContainer(GpGraphics *graphics, GraphicsContainer state)
GpStatus WINGDIPAPI GdipSetCompositingQuality(GpGraphics *graphics, CompositingQuality quality)
GpStatus WINGDIPAPI GdipSetInterpolationMode(GpGraphics *graphics, InterpolationMode mode)
GpStatus WINGDIPAPI GdipDrawImagePointsRect(GpGraphics *graphics, GpImage *image, GDIPCONST GpPointF *points, INT count, REAL srcx, REAL srcy, REAL srcwidth, REAL srcheight, GpUnit srcUnit, GDIPCONST GpImageAttributes *imageAttributes, DrawImageAbort callback, VOID *callbackData)
GpStatus WINGDIPAPI GdipFillPath(GpGraphics *graphics, GpBrush *brush, GpPath *path)
GpStatus WINGDIPAPI GdipFillRectangle(GpGraphics *graphics, GpBrush *brush, REAL x, REAL y, REAL width, REAL height)
GpStatus WINGDIPAPI GdipReleaseDC(GpGraphics *graphics, HDC hdc)
GpStatus WINGDIPAPI GdipRestoreGraphics(GpGraphics *graphics, GraphicsState state)
GpStatus WINGDIPAPI GdipSetPageUnit(GpGraphics *graphics, GpUnit unit)
GpStatus WINGDIPAPI GdipGetPageUnit(GpGraphics *graphics, GpUnit *unit)
GpStatus WINGDIPAPI GdipSetSmoothingMode(GpGraphics *graphics, SmoothingMode mode)
GpStatus WINGDIPAPI GdipGetWorldTransform(GpGraphics *graphics, GpMatrix *matrix)
GpStatus WINGDIPAPI GdipSetPixelOffsetMode(GpGraphics *graphics, PixelOffsetMode mode)
GpStatus WINGDIPAPI GdipResetWorldTransform(GpGraphics *graphics)
GpStatus WINGDIPAPI GdipSetPageScale(GpGraphics *graphics, REAL scale)
GpStatus WINGDIPAPI GdipBeginContainer2(GpGraphics *graphics, GraphicsContainer *state)
GpStatus WINGDIPAPI GdipCreatePath(GpFillMode fill, GpPath **path)
GpStatus WINGDIPAPI GdipDeletePath(GpPath *path)
GpStatus WINGDIPAPI GdipAddPathLine(GpPath *path, REAL x1, REAL y1, REAL x2, REAL y2)
GpStatus WINGDIPAPI GdipGetImageVerticalResolution(GpImage *image, REAL *res)
GpStatus WINGDIPAPI GdipGetImageWidth(GpImage *image, UINT *width)
GpStatus WINGDIPAPI GdipGetImageHeight(GpImage *image, UINT *height)
GpStatus WINGDIPAPI GdipCreateBitmapFromScan0(INT width, INT height, INT stride, PixelFormat format, BYTE *scan0, GpBitmap **bitmap)
GpStatus WINGDIPAPI GdipGetImageGraphicsContext(GpImage *image, GpGraphics **graphics)
GpStatus WINGDIPAPI GdipCreateBitmapFromGdiDib(GDIPCONST BITMAPINFO *info, VOID *bits, GpBitmap **bitmap)
GpStatus WINGDIPAPI GdipDisposeImage(GpImage *image)
GpStatus WINGDIPAPI GdipBitmapGetPixel(GpBitmap *bitmap, INT x, INT y, ARGB *color)
GpStatus WINGDIPAPI GdipBitmapSetPixel(GpBitmap *bitmap, INT x, INT y, ARGB color)
GpStatus WINGDIPAPI GdipGetImageBounds(GpImage *image, GpRectF *srcRect, GpUnit *srcUnit)
GpStatus WINGDIPAPI GdipGetImageHorizontalResolution(GpImage *image, REAL *res)
GpStatus WINGDIPAPI GdipCloneImage(GpImage *image, GpImage **cloneImage)
GpStatus WINGDIPAPI GdipGetMatrixElements(GDIPCONST GpMatrix *matrix, REAL *out)
GpStatus WINGDIPAPI GdipSetMatrixElements(GpMatrix *matrix, REAL m11, REAL m12, REAL m21, REAL m22, REAL dx, REAL dy)
GpStatus WINGDIPAPI GdipIsMatrixIdentity(GDIPCONST GpMatrix *matrix, BOOL *result)
GpStatus WINGDIPAPI GdipDeleteMatrix(GpMatrix *matrix)
GpStatus WINGDIPAPI GdipCreateMatrix(GpMatrix **matrix)
GpStatus WINGDIPAPI GdipCreatePen1(ARGB color, REAL width, GpUnit unit, GpPen **pen)
GpStatus WINGDIPAPI GdipDeletePen(GpPen *pen)
GpStatus WINGDIPAPI GdipCreateRegionRect(GDIPCONST GpRectF *rect, GpRegion **region)
GpStatus WINGDIPAPI GdipDeleteRegion(GpRegion *region)
BOOL WINAPI DeleteFileW(IN LPCWSTR lpFileName)
HMODULE WINAPI DECLSPEC_HOTPATCH GetModuleHandleA(LPCSTR lpModuleName)
HINSTANCE WINAPI DECLSPEC_HOTPATCH LoadLibraryA(LPCSTR lpLibFileName)
unsigned int(__cdecl typeof(jpeg_read_scanlines))(struct jpeg_decompress_struct *
static unsigned char buff[32768]
Status WINAPI GdiplusStartup(ULONG_PTR *token, const struct GdiplusStartupInput *input, struct GdiplusStartupOutput *output)
@ ObjectTypeImageAttributes
@ ColorMatrixFlagsDefault
@ CompositingModeSourceOver
@ CompositingModeSourceCopy
#define GDIP_EMFPLUS_RECORD_BASE
@ EmfPlusRecordTypeSetCompositingQuality
@ EmfPlusRecordTypeSetClipRect
@ EmfPlusRecordTypeResetWorldTransform
@ EmfPlusRecordTypeEndContainer
@ EmfPlusRecordTypeRotateWorldTransform
@ EmfPlusRecordTypeTranslateWorldTransform
@ EmfPlusRecordTypeDrawImagePoints
@ EmfPlusRecordTypeRestore
@ EmfPlusRecordTypeFillPath
@ EmfPlusRecordTypeSetPixelOffsetMode
@ EmfPlusRecordTypeSetCompositingMode
@ EmfPlusRecordTypeBeginContainer
@ EmfPlusRecordTypeDrawPath
@ EmfPlusRecordTypeObject
@ EmfPlusRecordTypeSetWorldTransform
@ EmfPlusRecordTypeFillRects
@ EmfPlusRecordTypeHeader
@ EmfPlusRecordTypeSetInterpolationMode
@ EmfPlusRecordTypeEndOfFile
@ EmfPlusRecordTypeSetPageTransform
@ EmfPlusRecordTypeSetAntiAliasMode
@ EmfPlusRecordTypeBeginContainerNoParams
@ EmfPlusRecordTypeScaleWorldTransform
@ EmfPlusRecordTypeMultiplyWorldTransform
@ EmfPlusRecordTypeSetClipRegion
@ EmfPlusRecordTypeSetTextRenderingHint
@ PixelOffsetModeHighQuality
@ CompositingQualityHighQuality
@ TextRenderingHintAntiAlias
@ TextRenderingHintSystemDefault
@ MetafileTypeEmfPlusOnly
@ MetafileTypeWmfPlaceable
@ MetafileTypeEmfPlusDual
@ InterpolationModeHighQualityBicubic
@ InterpolationModeHighQuality
@ InterpolationModeDefault
@ MetafileFrameUnitMillimeter
void WINAPI GdiplusShutdown(ULONG_PTR)
GLuint GLuint GLsizei count
GLint GLint GLsizei GLsizei height
GLint GLint GLsizei width
GLuint GLenum GLenum transform
GLenum GLenum GLenum GLenum GLenum scale
GpStatus WINGDIPAPI GdipSetImageAttributesColorMatrix(GpImageAttributes *imageattr, ColorAdjustType type, BOOL enableFlag, GDIPCONST ColorMatrix *colorMatrix, GDIPCONST ColorMatrix *grayMatrix, ColorMatrixFlags flags)
GpStatus WINGDIPAPI GdipCreateImageAttributes(GpImageAttributes **imageattr)
GpStatus WINGDIPAPI GdipDisposeImageAttributes(GpImageAttributes *imageattr)
#define comment(fmt, arg1)
static const WCHAR desc[]