DDLayer.inl
资源名称:DXGuide.zip [点击查看]
上传用户:wymy58
上传日期:2007-01-07
资源大小:2086k
文件大小:1k
源码类别:
DirextX编程
开发平台:
Visual C++
- // Copyright (C) 1999 DXGuide. All Rights Reserved.
- // File: DDLayer.inl
- // Inlines for CDDLayer
- inline void CDDLayer::ScrollUp(int nOffset)
- {
- m_nYOffset += nOffset;
- if (m_nYOffset > (int)m_dwHeight)
- m_nYOffset -= m_dwHeight;
- }
- inline void CDDLayer::ScrollDown(int nOffset)
- {
- m_nYOffset -= nOffset;
- if (m_nYOffset < 0)
- m_nYOffset = m_dwHeight + m_nYOffset;
- }
- inline void CDDLayer::ScrollLeft(int nOffset)
- {
- m_nXOffset += nOffset;
- if (m_nXOffset > (int)m_dwWidth)
- m_nXOffset -= m_dwWidth;
- }
- inline void CDDLayer::ScrollRight(int nOffset)
- {
- m_nXOffset -= nOffset;
- if (m_nXOffset < 0)
- m_nXOffset = m_dwWidth + m_nXOffset;
- }
- inline void CDDLayer::MoveTo(int nXOffset, int nYOffset)
- {
- m_nXOffset = nXOffset;
- m_nYOffset = nYOffset;
- }