📄 cegdiobject.h
字号:
/* ---------------------------------------------------------------------------------------------------
*
* Windows CE Graphics Libary v1.00.0000
*
*
* Written by James.
* Bug report : jiet@msn.com
* Copyright 2001
*/
// File : CEGDIObject.H
// Graphics Object head file.
//-----------------------------------------------------------------------------------------------------
// Update Information.
//-----------------------------------------------------------------------------------------------------
/*
* Created by James D. 2001.
* Date: 01/11/2001
*/
#ifndef _CEGDIOBJECT_
#define _CEGDIOBJECT_
#ifndef C_Class
#define C_Class struct
#endif
#include "CEGraphics.h"
#include "CEGDefine.h"
class CCEDraw;
//
// CCEGDIObject : Base class for all gdi Objects
//
C_Class CCEGDIObject
{
C_Class CCEGDIObject * gthis;
DWORD m_dwObjectType; // Indicate the object type
};
//
// CCEPen : Pen class
//
C_Class CCEPen
{
C_Class CCEPen* gthis;
DWORD m_dwObjectType; // Indicate the object type
UINT m_nPenStyle; // Pen Style, Not support now
UINT m_nWidth; // Pen Width, Not support now
unsigned short m_Color; // Pen Color
};
void CCEPen_Create(C_Class CCEPen* objthis);
BOOL CreatePen(C_Class CCEPen* objthis, UINT nPenStyle, UINT nWidth, unsigned short Color );
//
// CCEBrush : Brush class
//
C_Class CCEBrush
{
C_Class CCEBrush* gthis;
DWORD m_dwObjectType; // Indicate the object type
UINT m_nBrushStyle;
unsigned short m_Color;
long m_lbHatch;
};
void CCEBrush_Create(C_Class CCEBrush* objthis);
BOOL CreateBrush(C_Class CCEBrush* objthis, UINT nBrushStyle, unsigned short Color, long lbHatch );
//
// CCEFont : Font class
//
C_Class CCEFont
{
C_Class CCEFont* gthis;
DWORD m_dwObjectType; // Indicate the object type
HFONT m_hFont;
unsigned short m_nColor;
};
void CCEFont_Create(C_Class CCEFont* objthis);
void CCEFont_Delete(C_Class CCEFont* objthis);
BOOL CreateFont(C_Class CCEFont* objthis,
int nHeight,
int nWidth,
int nEscapement,
int nOrientation,
int nWeight,
BYTE bItalic,
BYTE bUnderline,
BYTE cStrikeOut,
BYTE nCharSet,
BYTE nOutPrecision,
BYTE nClipPrecision,
BYTE nQuality,
BYTE nPitchAndFamily,
LPCTSTR lpszFacename );
BOOL CreateFontIndirect(C_Class CCEFont* objthis, const LOGFONT *lpFont );
VOID SetFontColor(C_Class CCEFont* objthis, unsigned short nColor ){ objthis->m_nColor = nColor; }
//
// CCEBitmap : Bitmap Class
//
#include "imgdecmp.h"
// Define BitBle Style...
#define SRCALPHA 1001
#define SRCCOLORKEY 1002
// Define Buffer Type...
#define CEB_TYPE_BITMAP 10000
#define CEB_TYPE_SCREENBUFFER 10001
C_Class CCEBitmap
{
C_Class CCEBitmap* gthis;
DWORD m_dwObjectType; // Indicate the object type
SIZE m_sizeBitmap;
unsigned char* m_pBitmapBuffer;
unsigned short m_nType;
};
void CCEBitmap_Create(C_Class CCEBitmap* objthis);
void CCEBitmap_Delete(C_Class CCEBitmap* objthis);
BOOL LoadBitmap(C_Class CCEBitmap* objthis, CCEDraw* pCEDraw, LPCTSTR lpszBitmapName );
/*
* Transfers pixels from a specified source rectangle to a specified destination rectangle
*/
BOOL BitBlt(C_Class CCEBitmap* objthis,
CCEDraw* pCEDraw,
int nXDest, int nYDest,
int nWidth = 0, int nHeight = 0,
int nXSrc = 0, int nYSrc = 0,
DWORD dwRop = SRCCOPY,
float fAlpha = 0.5f );
/*
* Get the bitmap size...
*/
SIZE GetSize( C_Class CCEBitmap* objthis) { return objthis->m_sizeBitmap; }
HBITMAP LoadFile(C_Class CCEBitmap* objthis, LPCTSTR lpszBitmapName );
// Callback function to load image file data...
static void CALLBACK ImageProgress(C_Class CCEBitmap* objthis, IImageRender *, BOOL, LPARAM);
static DWORD CALLBACK GetImageData(C_Class CCEBitmap* objthis, LPSTR, DWORD, LPARAM);
#endif // _CEGDIOBJECT_
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -