PicControl.h
上传用户:gzboli
上传日期:2013-04-10
资源大小:471k
文件大小:1k
- // PicContro.h: interface for the CPicContro class.
- //
- //////////////////////////////////////////////////////////////////////
- #if !defined(AFX_PICCONTRO_H__F487A937_55F8_4B1E_972D_E5305DFD7647__INCLUDED_)
- #define AFX_PICCONTRO_H__F487A937_55F8_4B1E_972D_E5305DFD7647__INCLUDED_
- #if _MSC_VER > 1000
- #pragma once
- #endif // _MSC_VER > 1000
- #include "dibapi.h"
- #ifndef __YUTAO_PICCONTROL_
- #define __YUTAO_PICCONTROL_
- typedef struct sPicControl
- {
- long x; //center point x
- long y; //center point y
- double zoom; //Zoom ratio
- }PICCONTROL, *LPPICCONTROL;
- #endif//__YUTAO_PICCONTROL_
- class CPicControl
- {
- public:
- static double ViewFit(CPoint &ptDIBCent, const CRect &rcView, const HDIB hDIB);
- static double ViewActual(CPoint &ptDIBCent, const CRect &rcView, const HDIB hDIB);
- static double ZoomIn(double dZoom);
- static double ZoomOut(double dZoom);
- static double ZoomPan(CPoint &ptDIBCent,
- const CPoint& ptMouseD, const CPoint& ptMouseU, double dZoom);
- static double ZoomWindow(CPoint &ptDIBCent,
- const CRect &rcView, CRect &rcWindow, double dZoom);
- static void CalcuRect(CRect& rcView, CRect& rcDIB,
- const CPoint &ptDIBCent, const HDIB hDIB, double dZoom);
-
- static void ViewIdeal(CPoint &ptDIBCent, double &dZoom,
- const CView *pView, const HDIB hDIB);
- };
- #endif // !defined(AFX_PICCONTRO_H__F487A937_55F8_4B1E_972D_E5305DFD7647__INCLUDED_)