pnghand.h 994 B

1234567891011121314151617181920212223242526272829303132333435363738
  1. /////////////////////////////////////////////////////////////////////////////
  2. // Name: wx/osx/pnghand.h
  3. // Purpose: PNG bitmap handler
  4. // Author: Julian Smart
  5. // Modified by:
  6. // Created: 04/01/98
  7. // Copyright: (c) Julian Smart
  8. // Licence: wxWindows licence
  9. /////////////////////////////////////////////////////////////////////////////
  10. #ifndef _WX_PNGHAND_H_
  11. #define _WX_PNGHAND_H_
  12. #include "wx/defs.h"
  13. #if wxUSE_LIBPNG
  14. class WXDLLIMPEXP_CORE wxPNGFileHandler: public wxBitmapHandler
  15. {
  16. DECLARE_DYNAMIC_CLASS(wxPNGFileHandler)
  17. public:
  18. inline wxPNGFileHandler(void)
  19. {
  20. SetName(wxT("PNG bitmap file"));
  21. SetExtension(wxT("bmp"));
  22. SetType(wxBITMAP_TYPE_PNG);
  23. }
  24. virtual bool LoadFile(wxBitmap *bitmap, const wxString& name, long flags,
  25. int desiredWidth, int desiredHeight);
  26. virtual bool SaveFile(const wxBitmap *bitmap, const wxString& name, int type, const wxPalette *palette = NULL);
  27. };
  28. #endif //wxUSE_LIBPNG
  29. #endif
  30. // _WX_PNGHAND_H_