Resizer.h
上传用户:tuheem
上传日期:2007-05-01
资源大小:21889k
文件大小:1k
- /**************************************************************************************
- * *
- * *
- **************************************************************************************/
- #ifndef _RESIZER_H
- #define _RESIZER_H
- #include "Playa.h"
- #include <windows.h>
- /*
- * 屏幕高宽比的数据类型
- */
- typedef struct aspect_ratio_factor_s {
- DWORD xFactor;
- DWORD yFactor;
- } aspect_ratio_factors_t;
- extern aspect_ratio_factors_t aspectRatios[];
- class Resizer {
- private:
- POINT lastPt;
- POINT startPt;
-
- DWORD originalWidth;
- DWORD originalHeight;
- void DrawFree(HWND hwnd, POINT *pt1);
- void DrawOriginal(HWND hwnd, POINT *pt1);
- void DrawTV(HWND hwnd, POINT *pt1);
- void DrawWide(HWND hwnd, POINT *pt1);
- void DrawCustom(HWND hwnd, POINT *pt1);
- public:
- Resizer();
- ~Resizer();
- void Start(POINT *pt, DWORD originalWidth, DWORD originalHeight);
-
- void Draw(HWND hwnd, POINT *pt, aspect_ratio_t aspectRatio);
- POINT *GetLastPoint();
- void Stop();
- };
- #endif