Resizer.h
资源名称:VC++视频传输.rar [点击查看]
上传用户:hxb_1234
上传日期:2010-03-30
资源大小:8328k
文件大小:1k
源码类别:
VC书籍
开发平台:
Visual C++
- /**************************************************************************************
- * *
- * *
- **************************************************************************************/
- #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