阅读:1091回复:0
请教GPE源码
void
GPE::RotateRectl( RECTL *prcl ) { RECTL rclSwap = *prcl; switch (m_iRotate) { case DMDO_90: prcl->left = rclSwap.top; prcl->right = rclSwap.bottom; prcl->top = m_nScreenHeightSave - rclSwap.right; prcl->bottom = m_nScreenHeightSave - rclSwap.left; break; case DMDO_180: prcl->left = m_nScreenWidthSave - rclSwap.right; prcl->right = m_nScreenWidthSave - rclSwap.left; prcl->top = m_nScreenHeightSave - rclSwap.bottom; prcl->bottom = m_nScreenHeightSave - rclSwap.top; break; case DMDO_270: prcl->left = m_nScreenWidthSave - rclSwap.bottom; prcl->right = m_nScreenWidthSave - rclSwap.top; prcl->top = rclSwap.left; prcl->bottom = rclSwap.right; break; default: break; } } 是旋转矩形的,怎么也看不懂,到底是以哪个点为中心旋转啊? 请高手指教 |
|