#pragma once #include "common.h" // unknown name struct Bitmap { BITMAPINFOHEADER header; short palette[256]; }; class AFX_CLASS_EXPORT T2BitImage { public: T2BitImage(const char* path, unsigned int id, BOOL flip); T2BitImage(HINSTANCE path, unsigned int id, BOOL flip); T2BitImage(const RECT&); virtual ~T2BitImage(); virtual BOOL IsExist(); BOOL BeginDrawing(); void EndDrawing(); void CopyImage(T2BitImage&, const RECT&, const RECT&, int unk = 0, CRgn* rgn = NULL); void CopyImage(CDC*, const RECT&, const RECT&, int unk = 0, CRgn* rgn = NULL); void Clear(int); void SetBackGndColor(int); void SetForeGndColor(int); void SetOrigin(int, int); void SetClipRect(RECT*); void SetHalftoneMode(BOOL); void DrawFocusRect(RECT); void FillMesh(RECT, int); void FillRect(RECT, int); int GetPixel(int, int); int GetPixel(const POINT&); void DrawFrameRect(RECT, int); int GetParam() { return mParam; } void SetParam(int v) { mParam = v; } Bitmap mBitmap; unsigned char *mData; POINT mOrigin; HGLOBAL mMemHandle; int mForeGndColor; int mBackGndColor; RECT mClipRect; BOOL mHasClipRect; BOOL mHalftoneMode; int mParam; protected: void SetupBitmap(BITMAPINFO* info, BOOL flip); void DrawFocusRect2(RECT); void DrawFocusLine(int, int, int, int); void DrawFrameLine(int, int, int, int, int); };