X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/7c551d959447b3aea01cc35f45aa4cacff2173ba..00a693ed2fb7e0a8abf386a8ecee279f6301601b:/src/mac/pnghand.cpp?ds=sidebyside diff --git a/src/mac/pnghand.cpp b/src/mac/pnghand.cpp index 8d6d6544f5..af7b3a6f99 100644 --- a/src/mac/pnghand.cpp +++ b/src/mac/pnghand.cpp @@ -31,11 +31,14 @@ # include #endif -#include -#include -#include -#include -#include +#ifndef __WXMAC_X__ +# include +#endif +#include "wx/msgdlg.h" +#include "wx/palette.h" +#include "wx/bitmap.h" +#include "wx/mac/pnghand.h" +#include "wx/mac/pngread.h" extern "C" { #include "png.h" @@ -47,7 +50,7 @@ extern "C" void png_write_init PNGARG((png_structp png_ptr)); extern CTabHandle wxMacCreateColorTable( int numColors ) ; extern void wxMacDestroyColorTable( CTabHandle colors ) ; extern void wxMacSetColorTableEntry( CTabHandle newColors , int index , int red , int green , int blue ) ; -extern GWorldPtr wxMacCreateGWorld( int height , int width , int depth ) ; +extern GWorldPtr wxMacCreateGWorld( int width , int height , int depth ) ; extern void wxMacDestroyGWorld( GWorldPtr gw ) ; void @@ -115,7 +118,8 @@ wxPNGReader::Create(int width, int height, int depth, int colortype) { wxMacDestroyGWorld( lpbi ) ; } - if (lpbi = wxMacCreateGWorld( Width , Height , Depth) ) + lpbi = wxMacCreateGWorld( Width , Height , Depth); + if (lpbi) { EfeWidth = (long)(((long)Width*Depth + 31) / 32) * 4; int bitwidth = width ; @@ -410,7 +414,11 @@ bool wxPNGReader::ReadFile(char * ImageFileName) wxPNGReaderIter iter(this); /* open the file */ +#ifndef __UNIX__ fp = fopen(wxUnix2MacFilename( ImageFileName ), "rb"); +#else + fp = fopen( ImageFileName , "rb" ); +#endif if (!fp) return FALSE;