85 lines
1.6 KiB
C++
85 lines
1.6 KiB
C++
#ifndef _PROTO_GDILINE_HPP_
|
|
#define _PROTO_GDILINE_HPP_
|
|
#ifndef _COMMON_GDIPOINT_HPP_
|
|
#include <common/gdipoint.hpp>
|
|
#endif
|
|
|
|
class GDILine
|
|
{
|
|
public:
|
|
GDILine(void);
|
|
GDILine(const GDILine &someGDILine);
|
|
GDILine(const GDIPoint &firstPoint,const GDIPoint &secondPoint);
|
|
virtual ~GDILine();
|
|
GDILine &operator=(const GDILine &someGDILine);
|
|
BOOL operator==(const GDILine &someGDILine)const;
|
|
const GDIPoint &firstPoint(void)const;
|
|
void firstPoint(const GDIPoint &firstPoint);
|
|
const GDIPoint &secondPoint(void)const;
|
|
void secondPoint(const GDIPoint &secondPoint);
|
|
private:
|
|
GDIPoint mFirstPoint;
|
|
GDIPoint mSecondPoint;
|
|
};
|
|
|
|
inline
|
|
GDILine::GDILine(void)
|
|
{
|
|
}
|
|
|
|
inline
|
|
GDILine::GDILine(const GDILine &someGDILine)
|
|
{
|
|
*this=someGDILine;
|
|
}
|
|
|
|
inline
|
|
GDILine::GDILine(const GDIPoint &firstPoint,const GDIPoint &secondPoint)
|
|
: mFirstPoint(firstPoint), mSecondPoint(secondPoint)
|
|
{
|
|
}
|
|
|
|
inline
|
|
GDILine::~GDILine()
|
|
{
|
|
}
|
|
|
|
inline
|
|
GDILine &GDILine::operator=(const GDILine &someGDILine)
|
|
{
|
|
firstPoint(someGDILine.firstPoint());
|
|
secondPoint(someGDILine.secondPoint());
|
|
return *this;
|
|
}
|
|
|
|
inline
|
|
BOOL GDILine::operator==(const GDILine &someGDILine)const
|
|
{
|
|
return (firstPoint()==someGDILine.firstPoint()&&
|
|
secondPoint()==someGDILine.secondPoint());
|
|
}
|
|
|
|
inline
|
|
const GDIPoint &GDILine::firstPoint(void)const
|
|
{
|
|
return mFirstPoint;
|
|
}
|
|
|
|
inline
|
|
void GDILine::firstPoint(const GDIPoint &firstPoint)
|
|
{
|
|
mFirstPoint=firstPoint;
|
|
}
|
|
|
|
inline
|
|
const GDIPoint &GDILine::secondPoint(void)const
|
|
{
|
|
return mSecondPoint;
|
|
}
|
|
|
|
inline
|
|
void GDILine::secondPoint(const GDIPoint &secondPoint)
|
|
{
|
|
mSecondPoint=secondPoint;
|
|
}
|
|
#endif |