zoomrate.cpp
上传用户:ywlong9188
上传日期:2022-05-31
资源大小:2656k
文件大小:1k
- #include "stdafx.h"
- #include "zoomrate.h"
- IMPLEMENT_SERIAL(CZoomRate,CObject,0)
- CZoomRate::CZoomRate()
- {
- m_topRate = 0.0;
- m_bottomRate = 0.0;
- m_leftRate = 0.0;
- m_rightRate = 0.0;
- }
- void CZoomRate::SetRate(double topRate,double bottomRate,double leftRate,double rightRate)
- {
- m_topRate = topRate;
- m_bottomRate = bottomRate;
- m_leftRate = leftRate;
- m_rightRate = rightRate;
- }
- void CZoomRate::GetRate(double& topRate,double& bottomRate,double& leftRate,double& rightRate)
- {
- topRate = m_topRate;
- bottomRate = m_bottomRate;
- leftRate = m_leftRate ;
- rightRate = m_rightRate;
- }
- void CZoomRate::Serialize(CArchive& ar)
- {
- if(ar.IsStoring())
- {
- ar << m_topRate;
- ar << m_bottomRate;
- ar << m_leftRate;
- ar << m_rightRate;
- }
- else
- {
- ar >> m_topRate ;
- ar >> m_bottomRate;
- ar >> m_leftRate;
- ar >> m_rightRate;
- }
- }