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.

60 lines
2.0 KiB
C++

This file contains ambiguous Unicode characters!

This file contains ambiguous Unicode characters that may be confused with others in your current locale. If your use case is intentional and legitimate, you can safely ignore this warning. Use the Escape button to highlight these characters.

//////////////////////////////////////////////////////////////////////////////
//文件 Text.h
//主要功能:
//
//程序编写: 2005-12-07
/////////////////////////////////////////////////////////////////////////////
#pragma once
#include ".\pointnamerect.h"
#include "TextFlags.h"
class AFX_EXT_CLASS CText : public CTextFlags, public CPointNameRect
{
public:
CText(void);
virtual ~CText(void);
void Serialize(CArchive& ar, const short &ver) override;
virtual int Read(CFile& fr, const short &ver);
virtual void Write(CFile& fw, const short &ver);
virtual void WriteDML(CFile &fw, const short& ver, int nBaseTabNum);
virtual int ReadDML(CFile &fr, const short &ver);
virtual void WritePCG(CFile &fw, const short& ver, int nBaseTabNum);
virtual int ReadPCG(CFile &fr, const short &ver);
virtual void WritePCG2(CFile &fw, const short& ver, int nBaseTabNum);
virtual int ReadPCG2(CFile &fr, const short &ver);
int ReadFontPCG2(CFile &fr, const short &ver, CXmlParse& xp);
virtual CRect8 GetRect(void);
virtual bool GetRange(CRect8& range);
virtual BOOL IsInRange(CRect8& range);
virtual void GetRange(CPoint3D& minPoint, CPoint3D& maxPoint);
virtual void ExchangeXY(void);
virtual void ExchangeXY(void* pProjection); //转换到指定投影坐标,CPrljectio* pProjection
virtual void Rotate(double xs, double ys, double angle);
CSize LineCount(); //cx中为一行的最大字符个数cy中为行数
void Aligns(CRect8& range);
int GetLineString(int nBeginIndex, CString& strLine); //获得以nBeginIndex开始处到回车结束的一串字符返回字符结束处的索引号
CPoint2D GetLinePoint(int nLine,CSize count); //获得指定行的输出点坐标,需要旋转(当有角度时),count为行数与最大行的字符数
void operator=(CText& text);
BOOL m_bScript; //是否按上下角标方式显示
int ReadText(CFile& fr);
COLORREF color;
COLORREF m_bkColor;
double m_dTextSpace = 0;
double m_dLineSpace = 0;
public:
virtual int ReadPCG(void *pxp, const short &ver);
virtual int ReadPCG2(void *pxp, const short &ver);
int ReadFontPCG2(void *pxp, const short &ver);
};