48 lines
904 B
C++
48 lines
904 B
C++
#ifndef _MESHWRP_CONVEX_HPP_
|
|
#define _MESHWRP_CONVEX_HPP_
|
|
#ifndef _COMMON_WINDOWS_HPP_
|
|
#include <common/windows.hpp>
|
|
#endif
|
|
|
|
class Image;
|
|
class GUIWindow;
|
|
|
|
class Convex
|
|
{
|
|
public:
|
|
Convex(void);
|
|
virtual ~Convex(void);
|
|
Image performConvex(Image &srcImage,GUIWindow &window);
|
|
private:
|
|
void cartesianPoint(POINT &imagePoint)const;
|
|
void imagePoint(POINT &cartesianPoint)const;
|
|
void setPoint(int x,int y,POINT &somePoint)const;
|
|
|
|
unsigned long mxHalf;
|
|
unsigned long myHalf;
|
|
unsigned long mWidth;
|
|
unsigned long mHeight;
|
|
};
|
|
|
|
inline
|
|
void Convex::cartesianPoint(POINT &imagePoint)const
|
|
{
|
|
imagePoint.x-=mxHalf;
|
|
imagePoint.y=(mHeight-1)-(myHalf+imagePoint.y);
|
|
}
|
|
|
|
inline
|
|
void Convex::imagePoint(POINT &cartesianPoint)const
|
|
{
|
|
cartesianPoint.x+=mxHalf;
|
|
cartesianPoint.y=(mHeight-1)-(myHalf+cartesianPoint.y);
|
|
}
|
|
|
|
inline
|
|
void Convex::setPoint(int x,int y,POINT &point)const
|
|
{
|
|
point.x=x;
|
|
point.y=y;
|
|
}
|
|
#endif
|