summaryrefslogtreecommitdiff
path: root/src/T2DLL/T2BitImage.h
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--src/T2DLL/T2BitImage.h56
1 files changed, 56 insertions, 0 deletions
diff --git a/src/T2DLL/T2BitImage.h b/src/T2DLL/T2BitImage.h
new file mode 100644
index 0000000..5e23a62
--- /dev/null
+++ b/src/T2DLL/T2BitImage.h
@@ -0,0 +1,56 @@
+#pragma once
+#include "common.h"
+
+// unknown name
+struct Bitmap {
+ BITMAPINFOHEADER header;
+ short palette[256];
+};
+
+class DLL_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, CRgn*);
+ void CopyImage(CDC*, const RECT&, const RECT&, int, CRgn*);
+ 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; }
+
+protected:
+ friend class T2ImageObj;
+
+ void SetupBitmap(BITMAPINFO* info, BOOL flip);
+ void DrawFocusRect2(RECT);
+ void DrawFocusLine(int, int, int, int);
+ void DrawFrameLine(int, int, int, int, int);
+
+ Bitmap mBitmap;
+ unsigned char *mData;
+ POINT mOrigin;
+ HGLOBAL mMemHandle;
+ int mForeGndColor;
+ int mBackGndColor;
+ RECT mClipRect;
+ BOOL mHasClipRect;
+ BOOL mHalftoneMode;
+ int mParam;
+};