1
0

graphicsObject.h 1.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445
  1. #ifndef NULLSOFT_WINAMP_UTILITY_GRAPHICS_OBJECT_HEADER
  2. #define NULLSOFT_WINAMP_UTILITY_GRAPHICS_OBJECT_HEADER
  3. #if defined(_MSC_VER) && (_MSC_VER >= 1020)
  4. #pragma once
  5. #endif
  6. #include "./ifc_omgraphics.h"
  7. class GraphicsObject : public ifc_omgraphics
  8. {
  9. protected:
  10. GraphicsObject();
  11. ~GraphicsObject();
  12. public:
  13. static HRESULT CreateInstance(GraphicsObject **instance);
  14. public:
  15. /* Dispatchable */
  16. size_t AddRef();
  17. size_t Release();
  18. int QueryInterface(GUID interface_guid, void **object);
  19. /* ifc_omgraphics */
  20. HRESULT GetDistance(COLORREF rgb1, COLORREF rgb2, int *distance);
  21. HRESULT GetDarker(COLORREF rgb1, COLORREF rgb2, COLORREF *result);
  22. HRESULT BlendColor(COLORREF rgbTop, COLORREF rgbBottom, int alpha, COLORREF *result);
  23. HRESULT Colorize(BYTE *pixels, long cx, long cy, WORD bpp, COLORREF rgbBk, COLORREF rgbFg, BOOL removeAlpha);
  24. HRESULT BlendOnColor(HBITMAP hbmp, RECT *prcPart, BOOL premult, COLORREF rgb);
  25. HRESULT BlendOnColor2(BYTE *pixels, int bitmapCX, int bitmapCY, long x, long y, long cx, long cy, WORD bpp, BOOL premult, COLORREF rgb);
  26. HRESULT Premultiply(BYTE *pixels, long cx, long cy);
  27. HRESULT AlphaBlend(HDC hdcDest, const RECT *rectDest, HDC hdcSrc, const RECT *rectSrc, BLENDFUNCTION blendFunction);
  28. HRESULT AnimateRotation(HDC hdc, HBITMAP bitmapFrame, int frameCount, COLORREF rgbBk, BOOL fKeepSize, HBITMAP *result);
  29. protected:
  30. size_t ref;
  31. protected:
  32. RECVS_DISPATCH;
  33. };
  34. #endif // NULLSOFT_WINAMP_UTILITY_GRAPHICS_OBJECT_HEADER