📄 imagemanager.h
字号:
//===========================================================================================
// (林)葛府家橇飘
// 累己磊 : 辫肯荐
// 汲疙 : Image Manager 努饭胶
// 鞘夸茄 捞固瘤 器牢磐函荐唱 俊聪皋捞记 器牢磐函荐甫 流立 急攫
// 颇老 : 庆歹 颇老
//===========================================================================================
#ifndef _ImageManager_h_
#define _ImageManager_h_
#include "AEEdisp.h"
#include "AEEImage.h"
//-----郴波郴波----------------------
#include "BasicClass.h"
//-----------------------------------
#define IMG_NORMAL 0
#define IMG_90 1
#define IMG_180 2
#define IMG_270 3
#define IMG_MIRROR 4
#define IMG_MIRROR90 5
#define IMG_MIRROR180 6
#define IMG_MIRROR270 7
typedef enum
{
IMLEFT = 0,
IMCENTER,
IMRIGHT,
IMDOWNCENTER,
IMTOPCENTER
//IMDOWN
}ImgPos;
/*
typedef struct RGBQUAD
{
byte Red;
byte Green;
byte Blue;
byte reserved;
} RGBQUAD;
typedef struct {
char *pBitmap; // 厚飘甘狼 矫累 器牢磐
char *pData; // 厚飘甘 单捞磐狼 矫累 器牢磐
int nWidth; // 弊覆狼 呈厚
int nHeight; // 弊覆狼 臭捞
int nYGap; // 角力肺 Y谅钎荤捞狼 官捞飘 埃拜
int nBPP; // 迄 捞固瘤 惑俊辑狼 Byte Per Pixel
} BitmapInfo;
*/
typedef struct rleInfo
{
uint32 imageSize;
uint32 imageSize2;
uint16 paletteCnt;
byte clrBit;
}rleInfo;
typedef struct BITMAPFILEHEADER
{
uint16 bfType;
uint32 bfSize;
uint16 bfReserved1;
uint16 bfReserved2;
uint32 bfOffBits;
}BITMAPFILEHEADER;
typedef struct BITMAPINFOHEADER
{
uint32 biSize;
uint32 biWidth;
uint32 biHeight;
uint16 biPlanes;
uint16 bitCount;
uint32 biCompression;
uint32 biSizeImage;
uint32 biXPelsPerMeter;
uint32 biYPelsPerMeter;
uint32 biClrUsed;
uint32 biClrImportant;
}BITMAPINFOHEADER;
//-----BMP窍唱寸 备炼眉啊 窍唱究 鞘夸(秦力窍绊唱辑 犁劝侩 啊瓷)----
typedef struct KImage
{
void *image; // 厚飘甘矫累林家
int16 fWidth; // 弊覆 诚捞
int16 fHeight; // 弊覆 臭捞
boolean bVal; // 矫胶袍 皋葛府 荤侩咯何
}KImage;
//typedef struct KAnimation
//{
// KImage *image;
// uint16 FWidth; // 橇饭烙 气
// uint16 FHeight; // 橇饭烙 臭捞
// uint16 AniCnt; // 泅犁 柳青吝牢 局聪 锅龋
// uint16 FCount; // 局聪皋捞记 肮荐
//
// boolean onetime; // TRUE:茄锅 犁积窍绊 场巢 FLASE:拌加 犁积
//
//}KAnimation;
//-----捞固瘤 拘绵规侥阑 捞侩茄 概聪廉 努饭胶--------------------
class ImageManager : public BasicClass
{
public:
ImageManager();
virtual ~ImageManager();
//--ImageManager 努饭胶 檬扁拳 窃荐 积己饶俊 龋免 茄促
void Init_CImg( IShell* pIShell, IDisplay* pIDisplay );
void FreeAllImg(); // 葛电 捞固瘤 秦力
// 茄琶绕
void FreeUimg();
void FreeCimg();
void FreeBimg();
//
int GetImgWidth( KImage *image );
int GetImgHeight( KImage *image );
//========================== 拘绵 捞固瘤 =================================================================
//--Image Load窃荐 KImage 器牢磐函荐俊促 器牢磐甫 逞辫
KImage* LoadImg( const char *resFile, uint32 offset, int form );
//--Image Free窃荐
void K_Release( KImage **kImage );
//--Image Draw窃荐(捞固瘤 烹眉肺 谎覆)
void K_Draw( int x, int y, KImage *image, ImgPos ipos, AEERasterOp dwRopCode );
//--Image Draw窃荐(捞固瘤 荤捞令甫 瘤沥秦辑 谎覆)
void K_SizeDraw( int x, int y, KImage *image, int stx, int sty, int wd, int hg, ImgPos ipos, AEERasterOp dwRopCode );
//--animation 皋葛府且寸 棺 檬扁拳 窃荐
// KAnimation* K_AniCreat( int FWidth, int FHeight, int FCount, KImage *image, boolean onetime );
// //--animation destroy窃荐
// void K_AniDestroy( KAnimation **kbmani);
// //--animation 窃荐(皋牢鸥捞赣救俊辑 龋免)
// void K_Animation( int x, int y, KAnimation *aniimg, AEERasterOp dwRopCode );
//=============================================================================================================
//========================== BMP(SIS) 拘绵 绝捞 ===============================================================
// IIMAGE_Draw 窃荐 荤侩, BITBLT 荤侩且 何盒 眠啊 秦具凳
// IImage* BMP_Load( char * pszResFile, int t);
// void BMP_Release( IImage **iimage);
//
// void BMP_Draw( int x, int y, IImage* bmpimg, int stx, int sty, int wd, int hg, AEERasterOp dwRopCode );
//=============================================================================================================
public:
//--*鞘夸茄 捞固瘤甸狼 器牢磐函荐甫 流立 急攫*
KImage* uimg[30]; // 老馆 荤侩 捞固瘤
KImage* cimg[21]; // 某腐磐 捞固瘤
KImage* rcimg[21]; // 某腐磐 捞固瘤 IMG_MIRROR
KImage* bimg[26]; // 家 捞固瘤
KImage* rbimg[26]; // 家 捞固瘤 IMG_MIRROR
KImage* mimg[6]; // 肺靛 捞固瘤
//--*鞘夸茄 KAnimation狼 器牢磐函荐甫 流立 急攫*
//--厚飘甘阑 拘绵救窍绊 弊成 谎副锭 *函荐流立急攫*
private:
IShell* m_pIShell;
IDisplay* m_pIDisplay;
};
#endif
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -