1
0

graphics.h 1.1 KB

1234567891011121314151617181920212223242526
  1. #ifndef NULLSOFT_MEIDALIBRARY_GRAPHICS_HEADER
  2. #define NULLSOFT_MEIDALIBRARY_GRAPHICS_HEADER
  3. #if defined(_MSC_VER) && (_MSC_VER >= 1020)
  4. #pragma once
  5. #endif
  6. #include <windows.h>
  7. typedef struct _COLOR24 COLOR24;
  8. typedef void (*BMPFILTERPROC)(const COLOR24*, const COLOR24*, COLOR24*);
  9. HBITMAP CreateBitmapMask(HBITMAP originalBmp, COLORREF transColor); // Creates Mask Bitmap using specified color (helper)
  10. HBITMAP CreateBitmapMask(HBITMAP originalBmp, int cx, int cy); // Creates Mask Bitmap using color from specified location (helper)
  11. HBITMAP CreateBitmapMask(HBITMAP originalBmp, COLORREF transColor, int cx, int cy); // Creates Mask Bitmap if transColor is NULL uses color from specified position
  12. HBITMAP ConvertTo24bpp(HBITMAP bmp, int bpp=24); // creates a new bitmap with 24bpp. You responsible for destroying both
  13. HBITMAP PatchBitmapColors24(HBITMAP bitmap, COLORREF color1, COLORREF color2, BMPFILTERPROC filterProc);
  14. void Filter1(const COLOR24 *color1, const COLOR24 *color2, COLOR24 *pixel); // default filter 1
  15. void Filter2(const COLOR24 *color1, const COLOR24 *color2, COLOR24 *pixel); // default filter 2
  16. #endif //NULLSOFT_MEIDALIBRARY_GRAPHICS_HEADER