home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Chip 1997 October
/
Chip_1997-10_cd.bin
/
tema
/
sybase
/
powerj
/
hpp.z
/
WPOINT.INL
< prev
next >
Wrap
Text File
|
1996-06-06
|
3KB
|
84 lines
//
// 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