diff options
author | Jef <jef@targetspot.com> | 2024-09-24 08:54:57 -0400 |
---|---|---|
committer | Jef <jef@targetspot.com> | 2024-09-24 08:54:57 -0400 |
commit | 20d28e80a5c861a9d5f449ea911ab75b4f37ad0d (patch) | |
tree | 12f17f78986871dd2cfb0a56e5e93b545c1ae0d0 /Src/omBrowser/graphicsObject.h | |
parent | 537bcbc86291b32fc04ae4133ce4d7cac8ebe9a7 (diff) | |
download | winamp-20d28e80a5c861a9d5f449ea911ab75b4f37ad0d.tar.gz |
Initial community commit
Diffstat (limited to 'Src/omBrowser/graphicsObject.h')
-rw-r--r-- | Src/omBrowser/graphicsObject.h | 45 |
1 files changed, 45 insertions, 0 deletions
diff --git a/Src/omBrowser/graphicsObject.h b/Src/omBrowser/graphicsObject.h new file mode 100644 index 00000000..9ce94cf2 --- /dev/null +++ b/Src/omBrowser/graphicsObject.h @@ -0,0 +1,45 @@ +#ifndef NULLSOFT_WINAMP_UTILITY_GRAPHICS_OBJECT_HEADER +#define NULLSOFT_WINAMP_UTILITY_GRAPHICS_OBJECT_HEADER + +#if defined(_MSC_VER) && (_MSC_VER >= 1020) +#pragma once +#endif + +#include "./ifc_omgraphics.h" + + +class GraphicsObject : public ifc_omgraphics +{ +protected: + GraphicsObject(); + ~GraphicsObject(); + +public: + static HRESULT CreateInstance(GraphicsObject **instance); + +public: + /* Dispatchable */ + size_t AddRef(); + size_t Release(); + int QueryInterface(GUID interface_guid, void **object); + + /* ifc_omgraphics */ + HRESULT GetDistance(COLORREF rgb1, COLORREF rgb2, int *distance); + HRESULT GetDarker(COLORREF rgb1, COLORREF rgb2, COLORREF *result); + HRESULT BlendColor(COLORREF rgbTop, COLORREF rgbBottom, int alpha, COLORREF *result); + HRESULT Colorize(BYTE *pixels, long cx, long cy, WORD bpp, COLORREF rgbBk, COLORREF rgbFg, BOOL removeAlpha); + HRESULT BlendOnColor(HBITMAP hbmp, RECT *prcPart, BOOL premult, COLORREF rgb); + HRESULT BlendOnColor2(BYTE *pixels, int bitmapCX, int bitmapCY, long x, long y, long cx, long cy, WORD bpp, BOOL premult, COLORREF rgb); + HRESULT Premultiply(BYTE *pixels, long cx, long cy); + HRESULT AlphaBlend(HDC hdcDest, const RECT *rectDest, HDC hdcSrc, const RECT *rectSrc, BLENDFUNCTION blendFunction); + HRESULT AnimateRotation(HDC hdc, HBITMAP bitmapFrame, int frameCount, COLORREF rgbBk, BOOL fKeepSize, HBITMAP *result); + +protected: + size_t ref; + +protected: + RECVS_DISPATCH; +}; + + +#endif // NULLSOFT_WINAMP_UTILITY_GRAPHICS_OBJECT_HEADER
\ No newline at end of file |