Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
patch for GDI+ headers for cross-compiled MinGW
# GdiPlus headers for MinGW and description why they are needed
# can be found in several locations:
# http://www.miscdebris.net/blog/2009/09/17/adding-gdi-headers-to-mingw-to-compile-wxwidgets-with-wxgraphicscontext-support/
# http://www.codeproject.com/Tips/75491/GDIplus-Programming-With-MinGW.aspx
# http://code.google.com/p/wxmax/downloads/detail?name=gdiplus_includes.zip
#
# The patch below, applied to these headers, allows cross-compilation on Linux.
# It fixes two issues: mismatching case in header names (we are case-sensitive
# on Linux) and extra-qualification (it gives an error in recent GCC versions).
diff -ru include-orig/GdiPlus.h include/GdiPlus.h
--- include-orig/GdiPlus.h 2011-03-30 16:15:11.000000000 +0200
+++ include/GdiPlus.h 2011-03-30 15:55:18.000000000 +0200
@@ -26,45 +26,45 @@
{
namespace DllExports
{
- #include "GdiplusMem.h"
+ #include "GdiPlusMem.h"
};
- #include "GdiplusBase.h"
+ #include "GdiPlusBase.h"
- #include "GdiplusEnums.h"
- #include "GdiplusTypes.h"
- #include "GdiplusInit.h"
- #include "GdiplusPixelFormats.h"
- #include "GdiplusColor.h"
- #include "GdiplusMetaHeader.h"
- #include "GdiplusImaging.h"
- #include "GdiplusColorMatrix.h"
+ #include "GdiPlusEnums.h"
+ #include "GdiPlusTypes.h"
+ #include "GdiPlusInit.h"
+ #include "GdiPlusPixelFormats.h"
+ #include "GdiPlusColor.h"
+ #include "GdiPlusMetaHeader.h"
+ #include "GdiPlusImaging.h"
+ #include "GdiPlusColorMatrix.h"
- #include "GdiplusGpStubs.h"
- #include "GdiplusHeaders.h"
+ #include "GdiPlusGpStubs.h"
+ #include "GdiPlusHeaders.h"
namespace DllExports
{
- #include "GdiplusFlat.h"
+ #include "GdiPlusFlat.h"
};
- #include "GdiplusImageAttributes.h"
- #include "GdiplusMatrix.h"
- #include "GdiplusBrush.h"
- #include "GdiplusPen.h"
- #include "GdiplusStringFormat.h"
- #include "GdiplusPath.h"
- #include "GdiplusLineCaps.h"
- #include "GdiplusMetafile.h"
- #include "GdiplusGraphics.h"
- #include "GdiplusCachedBitmap.h"
- #include "GdiplusRegion.h"
- #include "GdiplusFontCollection.h"
- #include "GdiplusFontFamily.h"
- #include "GdiplusFont.h"
- #include "GdiplusBitmap.h"
- #include "GdiplusImageCodec.h"
+ #include "GdiPlusimageAttributes.h"
+ #include "GdiPlusMatrix.h"
+ #include "GdiPlusBrush.h"
+ #include "GdiPlusPen.h"
+ #include "GdiPlusStringFormat.h"
+ #include "GdiPlusPath.h"
+ #include "GdiPlusLineCaps.h"
+ #include "GdiPlusMetaFile.h"
+ #include "GdiPlusGraphics.h"
+ #include "GdiPlusCachedBitmap.h"
+ #include "GdiPlusRegion.h"
+ #include "GdiPlusFontCollection.h"
+ #include "GdiPlusFontFamily.h"
+ #include "GdiPlusFont.h"
+ #include "GdiPlusBitmap.h"
+ #include "GdiPlusImageCodec.h"
}; // namespace Gdiplus
diff -ru include-orig/GdiPlusMetaFile.h include/GdiPlusMetaFile.h
--- include-orig/GdiPlusMetaFile.h 2011-03-30 16:15:11.000000000 +0200
+++ include/GdiPlusMetaFile.h 2011-03-30 16:00:03.000000000 +0200
@@ -350,7 +350,7 @@
return metafileRasterizationLimitDpi;
}
- static UINT Metafile::EmfToWmfBits(
+ static UINT EmfToWmfBits(
IN HENHMETAFILE hemf,
IN UINT cbData16,
OUT LPBYTE pData16,
diff -ru include-orig/GdiPlusStringFormat.h include/GdiPlusStringFormat.h
--- include-orig/GdiPlusStringFormat.h 2011-03-30 16:15:11.000000000 +0200
+++ include/GdiPlusStringFormat.h 2011-03-30 15:53:46.000000000 +0200
@@ -217,7 +217,7 @@
));
}
- StringTrimming StringFormat::GetTrimming() const
+ StringTrimming GetTrimming() const
{
StringTrimming trimming;
SetStatus(DllExports::GdipGetStringFormatTrimming(
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.