gdiplus: Use nameless unions/structs.

This commit is contained in:
Alexandre Julliard 2023-07-13 11:57:07 +02:00
parent 36bb34fd7e
commit 313e4d0efc
2 changed files with 6 additions and 10 deletions

View file

@ -20,8 +20,6 @@
#include <stdarg.h>
#include <assert.h>
#define NONAMELESSUNION
#include "windef.h"
#include "winbase.h"
#include "winuser.h"

View file

@ -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;