Commit 313e4d0e authored by Alexandre Julliard's avatar Alexandre Julliard

gdiplus: Use nameless unions/structs.

parent 36bb34fd
......@@ -20,8 +20,6 @@
#include <stdarg.h>
#include <assert.h>
#define NONAMELESSUNION
#include "windef.h"
#include "winbase.h"
#include "winuser.h"
......
......@@ -20,8 +20,6 @@
#include <math.h>
#include <assert.h>
#define NONAMELESSUNION
#include "windef.h"
#include "winbase.h"
#include "wingdi.h"
......@@ -1702,7 +1700,7 @@ GpStatus METAFILE_GraphicsDeleted(GpMetafile* metafile)
BYTE* buffer;
UINT buffer_size;
gdi_bounds_rc = header.u.EmfHeader.rclBounds;
gdi_bounds_rc = header.EmfHeader.rclBounds;
if (gdi_bounds_rc.right > gdi_bounds_rc.left &&
gdi_bounds_rc.bottom > gdi_bounds_rc.top)
{
......@@ -4156,7 +4154,7 @@ GpStatus WINGDIPAPI GdipGetMetafileHeaderFromEmf(HENHMETAFILE hemf,
header->Y = gdip_round((REAL)emfheader.rclFrame.top / 2540.0 * header->DpiY);
header->Width = gdip_round((REAL)(emfheader.rclFrame.right - emfheader.rclFrame.left) / 2540.0 * header->DpiX);
header->Height = gdip_round((REAL)(emfheader.rclFrame.bottom - emfheader.rclFrame.top) / 2540.0 * header->DpiY);
header->u.EmfHeader = emfheader;
header->EmfHeader = emfheader;
if (metafile_type == MetafileTypeEmfPlusDual || metafile_type == MetafileTypeEmfPlusOnly)
{
......@@ -4259,11 +4257,11 @@ GpStatus WINGDIPAPI GdipCreateMetafileFromEmf(HENHMETAFILE hemf, BOOL delete,
(*metafile)->image.frame_count = 1;
(*metafile)->image.xres = header.DpiX;
(*metafile)->image.yres = header.DpiY;
(*metafile)->bounds.X = (REAL)header.u.EmfHeader.rclFrame.left / 2540.0 * header.DpiX;
(*metafile)->bounds.Y = (REAL)header.u.EmfHeader.rclFrame.top / 2540.0 * header.DpiY;
(*metafile)->bounds.Width = (REAL)(header.u.EmfHeader.rclFrame.right - header.u.EmfHeader.rclFrame.left)
(*metafile)->bounds.X = (REAL)header.EmfHeader.rclFrame.left / 2540.0 * header.DpiX;
(*metafile)->bounds.Y = (REAL)header.EmfHeader.rclFrame.top / 2540.0 * header.DpiY;
(*metafile)->bounds.Width = (REAL)(header.EmfHeader.rclFrame.right - header.EmfHeader.rclFrame.left)
/ 2540.0 * header.DpiX;
(*metafile)->bounds.Height = (REAL)(header.u.EmfHeader.rclFrame.bottom - header.u.EmfHeader.rclFrame.top)
(*metafile)->bounds.Height = (REAL)(header.EmfHeader.rclFrame.bottom - header.EmfHeader.rclFrame.top)
/ 2540.0 * header.DpiY;
(*metafile)->unit = UnitPixel;
(*metafile)->metafile_type = header.Type;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment