www.pudn.com > MyPlayerbylqh.rar > Resizer.h
/************************************************************************************** * * * * **************************************************************************************/ #ifndef _RESIZER_H #define _RESIZER_H #include "Playa.h" #include/* * 屏幕高宽比的数据类型 */ 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