home *** CD-ROM | disk | FTP | other *** search
- //
- // wpoint.inl -- Inline definitions for WPoint
- //
-
- #ifdef WCMINLINE
-
- WCMINLINE WPoint::WPoint( const POINT & o )
- /*****************************************/
- { x = o.x; y = o.y; }
-
- WCMINLINE WPoint::WPoint( const POINTL & o )
- /******************************************/
- { x = (WInt)o.x; y = (WInt)o.y; }
-
- WCMINLINE WPoint::WPoint( const POINTS & o )
- /******************************************/
- { x = o.x; y = o.y; }
-
- WCMINLINE POINTL WPoint::GetPOINTL() const
- /*****************************************/
- { POINTL p; p.x = x; p.y = y; return p; }
-
- WCMINLINE void WPoint::SetPOINTL( const POINTL & p )
- /****************************************************/
- { x = (WInt)p.x; y = (WInt)p.y; }
-
- WCMINLINE void WPoint::Create( const POINT & o )
- /***********************************************/
- { x = o.x; y = o.y; }
-
- WCMINLINE void WPoint::Create( const POINTL & o )
- /************************************************/
- { x = (WInt)o.x; y = (WInt)o.y; }
-
- WCMINLINE void WPoint::Create( const POINTS & o )
- /************************************************/
- { x = o.x; y = o.y; }
-
- void WPoint::Offset( WInt nx, WInt ny )
- /*************************************/
- { x += nx; y += ny; }
-
- void WPoint::Offset( const WPoint & pt )
- /***************************************/
- { x += pt.x; y += pt.y; }
-
- WPoint WPoint::operator+( const WPoint & o )
- /******************************************/
- { WPoint pt( *this ); pt.x += o.x; pt.y += o.y; return pt; }
-
- WPoint WPoint::operator-( const WPoint & o )
- /******************************************/
- { WPoint pt( *this ); pt.x -= o.x; pt.y -= o.y; return pt; }
-
- WPoint & WPoint::operator+=( const WPoint & o )
- /*********************************************/
- { x += o.x; y += o.y; return *this; }
-
- WPoint & WPoint::operator-=( const WPoint & o )
- /*********************************************/
- { x -= o.x; y -= o.y; return *this; }
-
- WPoint & WPoint::operator=( const POINT & o )
- /*******************************************/
- { x = o.x; y = o.y; return *this; }
-
- WPoint & WPoint::operator=( const POINTL & o )
- /********************************************/
- { x = (WInt)o.x; y = (WInt)o.y; return *this; }
-
- WPoint & WPoint::operator=( const POINTS & o )
- /********************************************/
- { x = o.x; y = o.y; return *this; }
-
- int WPoint::operator==( const WPoint & o ) const
- /**********************************************/
- { return ( x == o.x && y == o.y ); }
-
- int WPoint::operator!=( const WPoint & o ) const
- { return ( x != o.x || y != o.y ); }
-
- #endif
-
-