lineinfo.h

来自「关于字符分割的程序」· C头文件 代码 · 共 70 行

H
70
字号
// LineInfo.h: interface for the LineInfo class.
//
//////////////////////////////////////////////////////////////////////

#if !defined(AFX_LINEINFO_H__513E8914_7D01_42DA_BB9C_AA124D20987E__INCLUDED_)
#define AFX_LINEINFO_H__513E8914_7D01_42DA_BB9C_AA124D20987E__INCLUDED_

#if _MSC_VER > 1000
#pragma once
#endif // _MSC_VER > 1000
class LineInfo ;

class WordFragmentInfo
{
public:
	LineInfo * parentLine ;

//	//用于构建双向链表
	WordFragmentInfo * prior ;
	WordFragmentInfo * next ;
//
//	//记录当前文字在图片中所属范围
	int left;
	int right;
	int top;
	int bottom;
	int blackDotsInArea;
	
	WordFragmentInfo();
	virtual ~WordFragmentInfo();
	WordFragmentInfo(LineInfo * info);
	WordFragmentInfo(LineInfo * info, int left, int right);
	
	BOOL IsPunctuation(int minWidth, int minDensity);

	int Width_1()
	{
		return right - left +1;
	}

	int Height_1()
	{
		return bottom - top +1;
	}

};

class LineInfo  
{
public:
	int * DotsStatics;
	int LineNum ;
	WordFragmentInfo * first;
	WordFragmentInfo * last;
	LineInfo * next;
	
	int Top;
	int Bottom;	
	
	LineInfo();
	virtual ~LineInfo();

	int Height_1()
	{
		return Bottom - Top +1;
	}
};

#endif // !defined(AFX_LINEINFO_H__513E8914_7D01_42DA_BB9C_AA124D20987E__INCLUDED_)

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?