X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/634157786d854ad3802ebd934d51c4cd9726ef8f..55809d1394516044a90fa34b12070d0f3e9f1439:/include/wx/os2/pngread.h diff --git a/include/wx/os2/pngread.h b/include/wx/os2/pngread.h index fbc2afdf1f..e66f475a3b 100644 --- a/include/wx/os2/pngread.h +++ b/include/wx/os2/pngread.h @@ -1,9 +1,10 @@ /* - * File: pngread.h - * Purpose: PNG file reader - * Author: Alejandro Aguilar Sierra/Julian Smart - * Created: 1995 - * Copyright: (c) 1995, Alejandro Aguilar Sierra + * File: wx/os2/pngread.h + * Purpose: PNG file reader + * Author: Alejandro Aguilar Sierra/Julian Smart + * Created: 1995 + * RCS-ID: $Id$ + * Copyright: (c) 1995, Alejandro Aguilar Sierra * * */ @@ -21,15 +22,15 @@ typedef byte* ImagePointerType; typedef struct { - byte red; - byte green; - byte blue; + byte red; + byte green; + byte blue; } rgb_color_struct; -#define COLORTYPE_PALETTE 1 -#define COLORTYPE_COLOR 2 -#define COLORTYPE_ALPHA 4 +#define COLORTYPE_PALETTE 1 +#define COLORTYPE_COLOR 2 +#define COLORTYPE_ALPHA 4 class wxPNGReader { @@ -46,7 +47,7 @@ protected: long EfeWidth; // Efective Width - LPBITMAPINFOHEADER lpbi; + BITMAPINFOHEADER2* lpbi; int bgindex; wxPalette* Palette; bool imageOK; @@ -88,7 +89,8 @@ public: virtual bool InstantiateBitmap(wxBitmap *bitmap); wxMask *CreateMask(void); - inline bool Ok(void) { return imageOK; } + inline bool Ok() const { return IsOk(); } + inline bool IsOk(void) { return imageOK; } }; class wxPNGReaderIter @@ -142,7 +144,7 @@ inline wxPNGReaderIter::wxPNGReaderIter(wxPNGReader *imax): ima(imax) { if (ima) - IterImage = ima->RawImage; + IterImage = ima->RawImage; Itx = Ity = 0; Stepx = Stepy = 0; } @@ -157,9 +159,9 @@ inline bool wxPNGReaderIter::ItOK () { if (ima) - return ima->Inside(Itx, Ity); + return ima->Inside(Itx, Ity); else - return FALSE; + return FALSE; } @@ -205,7 +207,7 @@ inline void wxPNGReaderIter::SetRow(byte *buf, int n) // Here should be bcopy or memcpy //_fmemcpy(IterImage, (void far *)buf, n); if (n<0) - n = ima->GetWidth(); + n = ima->GetWidth(); for (int i=0; i= 0) return 1; - else { + else { Ity -= Stepy; if (Ity >= 0 && Ity < ima->Height) { @@ -283,4 +285,4 @@ inline bool wxPNGReaderIter::PrevStep() } #endif - + // _WX_PNGREAD__ \ No newline at end of file