You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
59 lines
1.3 KiB
C++
59 lines
1.3 KiB
C++
//////////////////////////////////////////////////////////////////////////////
|
|
//文件 ImageTraceBase.h
|
|
//主要功能:
|
|
//
|
|
//程序编写: 2005-12-07
|
|
/////////////////////////////////////////////////////////////////////////////
|
|
|
|
#pragma once
|
|
#include "afxtempl.h"
|
|
#include "ImageBase.h"
|
|
|
|
namespace NImage
|
|
{
|
|
|
|
typedef CList<POINT, POINT> CListPOINT;
|
|
|
|
class AFX_EXT_CLASS CImageTraceBase
|
|
{
|
|
public:
|
|
CImageTraceBase(void);
|
|
virtual ~CImageTraceBase(void);
|
|
|
|
void SetImage(CImageBase* pImage);
|
|
CImageBase* GetImage(void);
|
|
|
|
CListPOINT& GetLineList(void);
|
|
void ClearLineList(void);
|
|
|
|
COLORREF GetV(long x, long y);
|
|
void SetV(long x, long y, COLORREF color);
|
|
void GetIJ(int &x, int &y, int direct);
|
|
|
|
BYTE* GetPixelAddress(long x, long y);
|
|
int GetBpp(void);
|
|
int GetWidth(void);
|
|
int GetHeight(void);
|
|
|
|
BOOL IsSimilar(COLORREF cr1, COLORREF cr2); //是否是相同或相似的两个颜色
|
|
void SetColorSimilar(int errSimilar);
|
|
int GetColorSimilar(void);
|
|
|
|
void Undo(double nw);
|
|
int GetCurve(void *pCurve);
|
|
|
|
long GetLineSize(void); //获得一行的字节尺寸
|
|
|
|
protected:
|
|
//颜色相似度(颜色容限),也就是单位这间的最大误差值,在该范围内表示颜色是相似的,
|
|
//使RGB颜色任一分量的误差不能超过该容限值
|
|
int m_errColorSimilar;
|
|
|
|
CImageBase* m_pImage;
|
|
long m; //图片的高度\宽度
|
|
long n;
|
|
CListPOINT m_lineList;
|
|
};
|
|
|
|
};
|