|
|
//////////////////////////////////////////////////////////////////////////////
|
|
|
//文件 CurvePlay.h
|
|
|
//主要功能:
|
|
|
//
|
|
|
//程序编写: 2005-12-07
|
|
|
/////////////////////////////////////////////////////////////////////////////
|
|
|
|
|
|
#pragma once
|
|
|
|
|
|
class CXyDC;
|
|
|
#include "curveex.h"
|
|
|
|
|
|
namespace NCurveEmbellish
|
|
|
{
|
|
|
|
|
|
// CurvePlay.h
|
|
|
#define CurveArrowHead 101
|
|
|
#define CurveArrowTail 102
|
|
|
#define CurveScale 103
|
|
|
#define CurveRgn 104
|
|
|
#define CurveNameHead 105
|
|
|
#define CurveNameTail 106
|
|
|
#define CurveProperties 107
|
|
|
#define CurveInName 108
|
|
|
#define CurveLocate 109
|
|
|
#define CurveTwoMark 110
|
|
|
#define CurveInNameAny 111
|
|
|
#define CurveMarkHead 112
|
|
|
#define CurveMarkTail 113
|
|
|
#define CurveMarkMove 114
|
|
|
#define CurveEffect 115 //曲线填充效果,渐变充填
|
|
|
#define CurveCenterName 116 //在曲线范围的中心处上名字
|
|
|
//#define CurveName 3
|
|
|
|
|
|
//#define CurveInName_Class 0
|
|
|
//#define CurveInName_Name 1
|
|
|
|
|
|
#include "CurveType.h"
|
|
|
|
|
|
///////////////////////////////////////////////////////////////////////////////////////////////////////
|
|
|
|
|
|
//曲线修饰用,该值不能与曲线类型相重复
|
|
|
#define PLINE_SMOOTH_HEAD 0x00010000 //曲线圆头显示
|
|
|
#define PLINE_MARK_NAME_NUM 0x00020000 //表示按个数上名字
|
|
|
#define PLINE_MARK_NAME_STEP 0x00040000 //表示按步长上名字
|
|
|
|
|
|
#define PLINE_LOCAT_TYPE_L 0x00080000 //标注桩号值
|
|
|
#define PLINE_LOCAT_TYPE_Z 0x00100000 //标注Z值
|
|
|
#define PLINE_LOCAT_SCALEONE 0x00200000 //统一刻度
|
|
|
#define PLINE_LOCAT_DIRECTION 0x00400000 //统一方向
|
|
|
#define PLINE_LOCAT_NODE 0x00800000 //标注在节点处
|
|
|
#define PLINE_LOCAT_TO_INT 0x01000000 //桩号取整
|
|
|
#define PLINE_LOCAT_HEAD_TAIL 0x02000000 //标注曲线首尾桩号
|
|
|
#define PLINE_LOACT_ALL (PLINE_LOCAT_TYPE_L|PLINE_LOCAT_TYPE_Z|PLINE_LOCAT_SCALEONE|PLINE_LOCAT_DIRECTION|PLINE_LOCAT_NODE|PLINE_LOCAT_TO_INT|PLINE_LOCAT_HEAD_TAIL)
|
|
|
|
|
|
//上两个符号
|
|
|
#define PLINE_FAL_DIS_IN 0x02000000 //两符号间的距离
|
|
|
#define PLINE_FAL_DIS_HEAD 0x04000000 //到曲线两端的距离
|
|
|
|
|
|
//曲线名称
|
|
|
#define PLINE_NAME_ALONG_CURVE 0x08000000 //沿着曲线上名字
|
|
|
|
|
|
//曲线内部上名字
|
|
|
#define PLINE_IN_NAME_AUTO_DECREASE 0x10000000 //当文字太大时自动缩小
|
|
|
|
|
|
//箭头、符号
|
|
|
#define PLINE_ARROW_ALONG_CURVE PLINE_NAME_ALONG_CURVE //沿着曲线上符号
|
|
|
|
|
|
//曲线充填符号
|
|
|
#define PLINE_SOLID_BEZIER PLINE_BEZIER //B样条平滑充填
|
|
|
#define PLINE_SOLID_BCLOSE PLINE_BC //B样条闭合平滑充填
|
|
|
#define PLINE_SOLID_SPLINE PLINE_SPLINE //S样条平滑充填
|
|
|
#define PLINE_SOLID_SCLOSE PLINE_SPLINEC //S样条平滑充填闭合
|
|
|
|
|
|
class AFX_EXT_CLASS CCurveView //所有曲线修饰的基类
|
|
|
{
|
|
|
public:
|
|
|
CCurveView(int type);
|
|
|
CCurveView();
|
|
|
virtual ~CCurveView();
|
|
|
|
|
|
protected:
|
|
|
int m_type;
|
|
|
|
|
|
|
|
|
//为了多边形充填符号及渐变色等
|
|
|
void DoFillRgn(CXyDC& dc, CCurveEx* curve);
|
|
|
void DoFillRgn(CXyDC& dc, CPointList& ptList);
|
|
|
virtual void DoFillContent(CXyDC& dc, CRect8 range);
|
|
|
public:
|
|
|
void DoFillRgn(CRgn& rgn, CXyDC& dc);
|
|
|
|
|
|
public:
|
|
|
void* pDraw;
|
|
|
DWORD m_nFlags; //为了便于扩展,使用DWORD类型
|
|
|
virtual void Serialize(CArchive& ar, const short &ver);
|
|
|
virtual int Read(CFile &fr, const short &ver);
|
|
|
virtual void Write(CFile &fw, const short &ver, double cc);
|
|
|
virtual void Draw(CXyDC &dc,CCurveEx *curve);
|
|
|
virtual void ScaleProperty(double sx, double sy);
|
|
|
void operator=(CCurveView& cv);
|
|
|
|
|
|
virtual void WriteDML(CFile &fw, const short &ver, double cc, int nBaseTabNum);
|
|
|
virtual int ReadDML(CFile &fw, const short &ver, void* pXmlParse);
|
|
|
|
|
|
virtual void WritePCG(CFile &fw, const short &ver, double cc, int nBaseTabNum);
|
|
|
virtual int ReadPCG(CFile &fw, const short &ver, void* pXmlParse);
|
|
|
|
|
|
void SetType(int type);
|
|
|
int GetType(void);
|
|
|
COLORREF color;
|
|
|
|
|
|
void SetFlags(DWORD dwFlags);
|
|
|
DWORD GetFlags(void);
|
|
|
|
|
|
DWORD GetCurveType(void); //获得曲线类型
|
|
|
void SetCurveType(DWORD nType); //设置曲线类型
|
|
|
CString GetCurveTypeString(DWORD type);
|
|
|
|
|
|
public:
|
|
|
virtual int ReadPCG(const short &ver, void* pXmlParse);
|
|
|
};
|
|
|
|
|
|
class AFX_EXT_CLASS CCurveArrow : public CCurveView
|
|
|
{
|
|
|
public:
|
|
|
CCurveArrow(int type);
|
|
|
CCurveArrow();
|
|
|
virtual ~CCurveArrow();
|
|
|
|
|
|
protected:
|
|
|
void DrawArrow(CXyDC &dc,CCurveEx *curve,int stat);
|
|
|
int ReadArrow(CFile &fr);
|
|
|
|
|
|
public:
|
|
|
//void* pDraw;
|
|
|
CString MarkName;
|
|
|
CSize8 m_size;
|
|
|
double angle;
|
|
|
CSize8 m_szOffset; //符号沿着线偏移方向为CX,垂直线偏移方向为CY
|
|
|
|
|
|
virtual void Serialize(CArchive& ar, const short &ver);
|
|
|
virtual int Read(CFile &fr, const short &ver);
|
|
|
virtual void Write(CFile &fw, const short &ver, double cc);
|
|
|
virtual void Draw(CXyDC &dc,CCurveEx *curve);
|
|
|
virtual void ScaleProperty(double sx, double sy);
|
|
|
void operator=(CCurveArrow& ca);
|
|
|
int PositionNew(int bReplace);
|
|
|
|
|
|
BOOL IsAlongCurve(void);
|
|
|
void EnableAlongCurve(BOOL bEnable);
|
|
|
|
|
|
virtual void WriteDML(CFile &fw, const short &ver, double cc, int nBaseTabNum);
|
|
|
virtual int ReadDML(CFile &fw, const short &ver, void* pXmlParse);
|
|
|
|
|
|
virtual void WritePCG(CFile &fw, const short &ver, double cc, int nBaseTabNum);
|
|
|
virtual int ReadPCG(CFile &fw, const short &ver, void* pXmlParse);
|
|
|
public:
|
|
|
virtual int ReadPCG( const short &ver, void* pXmlParse);
|
|
|
};
|
|
|
|
|
|
class AFX_EXT_CLASS CCurveLocate : public CCurveView
|
|
|
{
|
|
|
public:
|
|
|
CCurveLocate();
|
|
|
virtual ~CCurveLocate();
|
|
|
|
|
|
protected:
|
|
|
void DrawNode(CXyDC &dc,CCurveEx *pCurve);
|
|
|
void DrawAngle(CXyDC & dc, CCurveEx * curve);
|
|
|
int GetValue(CCurveEx * curve,double vl,double &x0,double &y0,double &angle);
|
|
|
void OffsetText(double &x,double &y,double a);
|
|
|
CString FloatToString(double val);
|
|
|
|
|
|
public:
|
|
|
virtual void Serialize(CArchive& ar, const short &ver);
|
|
|
virtual int Read(CFile &fr, const short &ver); //老格式
|
|
|
virtual void Write(CFile &fw, const short &ver, double cc);
|
|
|
virtual void Draw(CXyDC &dc,CCurveEx *curve);
|
|
|
virtual void ScaleProperty(double sx, double sy);
|
|
|
void operator=(CCurveLocate& cl);
|
|
|
|
|
|
virtual void WriteDML(CFile &fw, const short &ver, double cc, int nBaseTabNum);
|
|
|
virtual int ReadDML(CFile &fr, const short &ver, void* pXmlParse);
|
|
|
|
|
|
virtual void WritePCG(CFile &fw, const short &ver, double cc, int nBaseTabNum);
|
|
|
virtual int ReadPCG(CFile &fr, const short &ver, void* pXmlParse);
|
|
|
|
|
|
//DWORD m_nFlags; //标注方式\类型\曲线类型等
|
|
|
CSize8 m_size;
|
|
|
CSize8 m_offset;
|
|
|
double step,angle,l1,l2;
|
|
|
long m_decimal; //保留小数位数
|
|
|
LOGFONT m_logFont;
|
|
|
|
|
|
void EnableHeadTail(BOOL bEnable);
|
|
|
void EnableDirection(BOOL bDirection);
|
|
|
void EnableScaleOne(BOOL bScaleOne);
|
|
|
void EnableToInt(BOOL bInt);
|
|
|
void EnableInNode(BOOL bNode);
|
|
|
void SetMarkValue(BOOL bIsValueZ); //bIsValueZ=TRUE时标注Z值,否则标注桩号值
|
|
|
void SetCurveType(DWORD nType); //设置曲线类型
|
|
|
DWORD GetCurveType(void); //获得曲线类型
|
|
|
|
|
|
CCurveEx* GetSmoothCurve(CXyDC& dc, CCurveEx* curve); //当时光滑曲线时,获得实际光滑曲线;
|
|
|
|
|
|
BOOL IsHeadTail(void); //标注曲线首尾桩号
|
|
|
BOOL IsInNode(void); //标注在节点处
|
|
|
BOOL IsScaleOne(void); //统一刻度
|
|
|
BOOL IsToInt(void); //桩号取整
|
|
|
BOOL IsDirection(void); //统一方向
|
|
|
BOOL IsMarkZ(void); //是标注Z值还是标注桩号
|
|
|
|
|
|
public:
|
|
|
virtual int ReadPCG(const short &ver, void* pXmlParse);
|
|
|
};
|
|
|
|
|
|
class AFX_EXT_CLASS CCurveLocateEx : public CCurveLocate
|
|
|
{
|
|
|
public:
|
|
|
CCurveLocateEx();
|
|
|
virtual int Read(CFile &fr, const short &ver);//新格式
|
|
|
};
|
|
|
|
|
|
class AFX_EXT_CLASS CCurveScale : public CCurveLocate
|
|
|
{
|
|
|
public:
|
|
|
CCurveScale();
|
|
|
virtual ~CCurveScale();
|
|
|
|
|
|
protected:
|
|
|
void DrawNode(CXyDC &dc,CCurveEx *curve);
|
|
|
void DrawTurn(CXyDC &dc,CCurveEx *curve);
|
|
|
|
|
|
public:
|
|
|
virtual void Serialize(CArchive& ar, const short &ver);
|
|
|
virtual int Read(CFile &fr, const short &ver); //老格式读取
|
|
|
virtual void Write(CFile &fw, const short &ver, double cc);
|
|
|
virtual void Draw(CXyDC &dc,CCurveEx *pCurve);
|
|
|
void operator=(CCurveScale& cs);
|
|
|
int PositionNew(int bReplace);
|
|
|
|
|
|
virtual void WriteDML(CFile &fw, const short &ver, double cc, int nBaseTabNum);
|
|
|
virtual int ReadDML(CFile &fr, const short &ver, void* pXmlParse);
|
|
|
|
|
|
virtual void WritePCG(CFile &fw, const short &ver, double cc, int nBaseTabNum);
|
|
|
virtual int ReadPCG(CFile &fr, const short &ver, void* pXmlParse);
|
|
|
|
|
|
CString MarkName;
|
|
|
//void* pDraw;
|
|
|
public:
|
|
|
virtual int ReadPCG( const short &ver, void* pXmlParse);
|
|
|
};
|
|
|
|
|
|
class AFX_EXT_CLASS CCurveScaleEx : public CCurveScale
|
|
|
{
|
|
|
public:
|
|
|
CCurveScaleEx();
|
|
|
virtual int Read(CFile& fr, const short &ver); //新格式读取
|
|
|
};
|
|
|
|
|
|
class AFX_EXT_CLASS CCurveMarkSymbol
|
|
|
{
|
|
|
public:
|
|
|
CCurveView* m_pActualValue;
|
|
|
|
|
|
public:
|
|
|
CCurveMarkSymbol();
|
|
|
~CCurveMarkSymbol();
|
|
|
int ReadPCG(CFile &fr, const short &ver, void* pXmlParse);
|
|
|
int WritePCG(CFile &fw, const short &ver, void* pCurveView, int nBaseTabNum);
|
|
|
void SetType(int type);
|
|
|
|
|
|
//CString MarkName; //符号名
|
|
|
//void* pDraw; //符号
|
|
|
|
|
|
private:
|
|
|
int m_type;
|
|
|
public:
|
|
|
int ReadPCG(const short &ver, void* pXmlParse);
|
|
|
};
|
|
|
|
|
|
class AFX_EXT_CLASS CCurveTwoMark : public CCurveLocate
|
|
|
{
|
|
|
public:
|
|
|
CCurveTwoMark();
|
|
|
virtual ~CCurveTwoMark();
|
|
|
|
|
|
public:
|
|
|
CString MarkName;
|
|
|
//void* pDraw;
|
|
|
|
|
|
virtual void Serialize(CArchive& ar, const short &ver);
|
|
|
virtual int Read(CFile &fr, const short &ver);
|
|
|
virtual void Write( CFile &fw, const short &ver, double cc );
|
|
|
virtual void ScaleProperty(double sx, double sy);
|
|
|
|
|
|
virtual void WriteDML(CFile &fw, const short &ver, double cc, int nBaseTabNum);
|
|
|
virtual int ReadDML(CFile &fr, const short &ver, void* pXmlParse);
|
|
|
|
|
|
virtual void WritePCG(CFile &fw, const short &ver, double cc, int nBaseTabNum);
|
|
|
virtual int ReadPCG(CFile &fr, const short &ver, void* pXmlParse);
|
|
|
|
|
|
virtual void Draw(CXyDC &dc,CCurveEx *pCurve);
|
|
|
void operator=(CCurveTwoMark& cf);
|
|
|
int PositionNew(int bReplace);
|
|
|
DWORD GetDistanceMode(void);
|
|
|
void SetDitanceMode(DWORD nMode);
|
|
|
public:
|
|
|
virtual int ReadPCG( const short &ver, void* pKXmlParse);
|
|
|
};
|
|
|
|
|
|
class AFX_EXT_CLASS CCurveTwoMarkEx : public CCurveTwoMark
|
|
|
{
|
|
|
public:
|
|
|
CCurveTwoMarkEx();
|
|
|
virtual int Read(CFile &fr, const short &ver);
|
|
|
};
|
|
|
|
|
|
class AFX_EXT_CLASS CCurveMarkMove : public CCurveScaleEx
|
|
|
{
|
|
|
public:
|
|
|
CCurveMarkMove();
|
|
|
virtual ~CCurveMarkMove();
|
|
|
|
|
|
public:
|
|
|
BOOL bMarkMove;
|
|
|
CCurveEx *curve;
|
|
|
double startl, endl;
|
|
|
void Move(double v);
|
|
|
|
|
|
virtual void Serialize(CArchive& ar, const short &ver);
|
|
|
virtual int Read(CFile &fr, const short &ver);
|
|
|
virtual void Write(CFile &fw, const short &ver, double cc);
|
|
|
virtual void Draw(CXyDC &dc,CCurveEx *curve);
|
|
|
void operator=(CCurveMarkMove& cm);
|
|
|
|
|
|
virtual void WriteDML(CFile &fw, const short &ver, double cc, int nBaseTabNum);
|
|
|
virtual int ReadDML(CFile &fr, const short &ver, void* pXmlParse);
|
|
|
|
|
|
virtual void WritePCG(CFile &fw, const short &ver, double cc, int nBaseTabNum);
|
|
|
virtual int ReadPCG(CFile &fr, const short &ver, void* pXmlParse);
|
|
|
public:
|
|
|
virtual int ReadPCG(const short &ver, void* pXmlParse);
|
|
|
};
|
|
|
|
|
|
class AFX_EXT_CLASS CCurveRgn : public CCurveView
|
|
|
{
|
|
|
public:
|
|
|
CCurveRgn();
|
|
|
virtual ~CCurveRgn();
|
|
|
|
|
|
protected:
|
|
|
virtual void DoFillContent(CXyDC& dc, CRect8 range);
|
|
|
|
|
|
public:
|
|
|
virtual void Serialize(CArchive& ar, const short &ver);
|
|
|
virtual int Read(CFile &fr, const short &ver);
|
|
|
virtual void Write( CFile &fw, const short &ver, double cc );
|
|
|
virtual void Draw(CXyDC &dc,CCurveEx *curve);
|
|
|
virtual void ScaleProperty(double sx, double sy);
|
|
|
|
|
|
virtual void WriteDML(CFile &fw, const short &ver, double cc, int nBaseTabNum);
|
|
|
virtual int ReadDML(CFile &fr, const short &ver, void* pXmlParse);
|
|
|
|
|
|
virtual void WritePCG(CFile &fw, const short &ver, double cc, int nBaseTabNum);
|
|
|
virtual int ReadPCG(CFile &fr, const short &ver, void* pXmlParse);
|
|
|
|
|
|
virtual void WritePCG2(CFile &fw, const short &ver, double cc, int nBaseTabNum);
|
|
|
virtual int ReadPCG2(CFile &fr, const short &ver, void* pXmlParse);
|
|
|
|
|
|
void operator=(CCurveRgn& cr);
|
|
|
int PositionNew(int bReplace);
|
|
|
|
|
|
CString MarkName; //符号名称
|
|
|
CSize8 m_grid; //符号间的空白间隔
|
|
|
CSize8 m_delt; //符号大小
|
|
|
CSize8 m_scale; //符号尺寸绽放比例
|
|
|
void* pDraw; //符号指针
|
|
|
|
|
|
public:
|
|
|
virtual int ReadPCG( const short &ver, void* pKXmlParse);
|
|
|
virtual int ReadPCG2( const short &ver, void* pKXmlParse);
|
|
|
};
|
|
|
|
|
|
class AFX_EXT_CLASS CCurveName:public CCurveArrow
|
|
|
{
|
|
|
public:
|
|
|
CCurveName(int type);
|
|
|
CCurveName();
|
|
|
virtual ~CCurveName();
|
|
|
|
|
|
public:
|
|
|
virtual void Serialize(CArchive& ar, const short &ver);
|
|
|
virtual int Read(CFile &fr, const short &ver);
|
|
|
virtual void Write(CFile &fw, const short &ver, double cc);
|
|
|
virtual void Draw(CXyDC &dc,CCurveEx *curve);
|
|
|
|
|
|
virtual void WriteDML(CFile &fw, const short &ver, double cc, int nBaseTabNum);
|
|
|
virtual int ReadDML(CFile &fr, const short &ver, void* pXmlParse);
|
|
|
|
|
|
virtual void WritePCG(CFile &fw, const short &ver, double cc, int nBaseTabNum);
|
|
|
virtual int ReadPCG(CFile &fr, const short &ver, void* pXmlParse);
|
|
|
|
|
|
virtual void WritePCG2(CFile &fw, const short &ver, double cc, int nBaseTabNum);
|
|
|
virtual int ReadPCG2(CFile &fr, const short &ver, void* pXmlParse);
|
|
|
|
|
|
CString HeadString;
|
|
|
int state = 0;
|
|
|
LOGFONT m_logFont;
|
|
|
|
|
|
long m_decimalName; //保留小数位数
|
|
|
|
|
|
void operator=(CCurveName& cn);
|
|
|
|
|
|
BOOL IsAlongCurve(void);
|
|
|
void EnableAlongCurve(BOOL bEnable);
|
|
|
public:
|
|
|
virtual int ReadPCG( const short &ver, void* pXmlParse);
|
|
|
virtual int ReadPCG2(const short &ver, void* pXmlParse);
|
|
|
};
|
|
|
|
|
|
class AFX_EXT_CLASS CCurveProperties:public CCurveArrow
|
|
|
{
|
|
|
public:
|
|
|
CCurveProperties();
|
|
|
virtual ~CCurveProperties();
|
|
|
|
|
|
public:
|
|
|
virtual void Serialize(CArchive& ar, const short &ver);
|
|
|
virtual int Read(CFile &fr, const short &ver);
|
|
|
virtual void Write(CFile &fw, const short &ver, double cc);
|
|
|
virtual void Draw(CXyDC &dc,CCurveEx *curve);
|
|
|
virtual void ScaleProperty(double sx, double sy);
|
|
|
|
|
|
virtual void WriteDML(CFile &fw, const short &ver, double cc, int nBaseTabNum);
|
|
|
virtual int ReadDML(CFile &fr, const short &ver, void* pXmlParse);
|
|
|
|
|
|
virtual void WritePCG(CFile &fw, const short &ver, double cc, int nBaseTabNum);
|
|
|
virtual int ReadPCG(CFile &fr, const short &ver, void* pXmlParse);
|
|
|
|
|
|
void operator=(CCurveProperties& cp);
|
|
|
BOOL IsSmoothHead(void);
|
|
|
void EnableSmoothHead(BOOL bEnable);
|
|
|
BOOL IsVirtual(void);
|
|
|
void EnableVirtual(BOOL bEnable);
|
|
|
|
|
|
//DWORD m_nFlags; //曲线的类型\圆头显示, 为了便于扩展,使用DWORD类型
|
|
|
double m_offset;
|
|
|
double m_SmoothStep;
|
|
|
int m_alpha = 255; // 透明度,255 表示不透明
|
|
|
CCurveType VirtualType;
|
|
|
stuCurveWave m_stuCurveWave; //为了波浪线的修饰
|
|
|
|
|
|
protected:
|
|
|
void Draw(CXyDC &dc,CCurveEx *curve,double l1,double l2);
|
|
|
virtual void DoFillContent(CXyDC& dc, CRect8 range);
|
|
|
|
|
|
public:
|
|
|
virtual int ReadPCG( const short &ver, void* pKXmlParse);
|
|
|
|
|
|
};
|
|
|
|
|
|
class AFX_EXT_CLASS CCurvePropertiesEx : public CCurveProperties //新格式
|
|
|
{
|
|
|
public:
|
|
|
CCurvePropertiesEx();
|
|
|
virtual int Read(CFile &fr, const short &ver);
|
|
|
};
|
|
|
|
|
|
class AFX_EXT_CLASS CCurveInName:public CCurveProperties
|
|
|
{
|
|
|
public:
|
|
|
CCurveInName();
|
|
|
virtual ~CCurveInName();
|
|
|
|
|
|
public:
|
|
|
virtual void Serialize(CArchive& ar, const short &ver);
|
|
|
virtual int Read(CFile &fr, const short &ver);
|
|
|
virtual void Write(CFile &fw, const short &ver, double cc);
|
|
|
virtual void Draw(CXyDC &dc,CCurveEx *curve);
|
|
|
virtual void ScaleProperty(double sx, double sy);
|
|
|
|
|
|
virtual void WriteDML(CFile &fw, const short &ver, double cc, int nBaseTabNum);
|
|
|
virtual int ReadDML(CFile &fr, const short &ver, void* pXmlParse);
|
|
|
|
|
|
virtual void WritePCG2(CFile &fw, const short &ver, double cc, int nBaseTabNum);
|
|
|
virtual void WritePCG(CFile &fw, const short &ver, double cc, int nBaseTabNum);
|
|
|
virtual int ReadPCG(CFile &fr, const short &ver, void* pXmlParse);
|
|
|
virtual int ReadPCG2(CFile &fr, const short &ver, void* pXmlParse);
|
|
|
|
|
|
void DrawStep(CXyDC &dc, CCurveEx *curve, CString name);
|
|
|
double Draw(CXyDC &dc,CCurveEx *curve,CString &name,double l0);
|
|
|
|
|
|
void operator=(CCurveInName& cn);
|
|
|
|
|
|
void SetInNameType(DWORD nIdea);
|
|
|
DWORD GetInNameType(void);
|
|
|
|
|
|
long m_nameNum; //内部名字的个数
|
|
|
COLORREF text_color;
|
|
|
double offset,text_h,step;
|
|
|
LOGFONT m_logFont;
|
|
|
long m_decimalName; //保留小数位数
|
|
|
|
|
|
void EnableAutoDecrease(BOOL bEnable);
|
|
|
BOOL IsAutoDecrease(void);
|
|
|
public:
|
|
|
virtual int ReadPCG( const short &ver, void* pXmlParse);
|
|
|
virtual int ReadPCG2( const short &ver, void* pXmlParse);
|
|
|
};
|
|
|
|
|
|
class AFX_EXT_CLASS CCurveInNameEx : public CCurveInName
|
|
|
{
|
|
|
public:
|
|
|
CCurveInNameEx();
|
|
|
virtual int Read(CFile &fr, const short &ver);
|
|
|
};
|
|
|
|
|
|
class AFX_EXT_CLASS CCurveInNameAny : public CCurveInName
|
|
|
{
|
|
|
public:
|
|
|
CCurveInNameAny();
|
|
|
virtual ~CCurveInNameAny();
|
|
|
|
|
|
public:
|
|
|
double GetBeginPoint(CXyDC &dc, CCurveEx*curve, CString &name, double l0);
|
|
|
|
|
|
virtual void Serialize(CArchive& ar, const short &ver);
|
|
|
virtual int Read(CFile &fr, const short &ver);
|
|
|
virtual void Write(CFile &fw, const short &ver, double cc);
|
|
|
virtual void Draw(CXyDC &dc,CCurveEx*curve);
|
|
|
|
|
|
virtual void WriteDML(CFile &fw, const short &ver, double cc, int nBaseTabNum);
|
|
|
virtual int ReadDML(CFile &fr, const short &ver, void* pXmlParse);
|
|
|
|
|
|
virtual void WritePCG(CFile &fw, const short &ver, double cc, int nBaseTabNum);
|
|
|
virtual int ReadPCG(CFile &fr, const short &ver, void* pXmlParse);
|
|
|
|
|
|
virtual void WritePCG2(CFile &fw, const short &ver, double cc, int nBaseTabNum);
|
|
|
|
|
|
void Create(int nNumL0);
|
|
|
void operator=(CCurveInNameAny& ca);
|
|
|
|
|
|
double * l0;
|
|
|
public:
|
|
|
virtual int ReadPCG( const short &ver, void* pXmlParse);
|
|
|
};
|
|
|
|
|
|
class AFX_EXT_CLASS CCurveInNameAnyEx : public CCurveInNameAny
|
|
|
{
|
|
|
public:
|
|
|
CCurveInNameAnyEx();
|
|
|
virtual ~CCurveInNameAnyEx();
|
|
|
|
|
|
virtual int Read(CFile &fr, const short &ver);
|
|
|
};
|
|
|
|
|
|
|
|
|
//曲线填充效果,渐变色填充
|
|
|
class AFX_EXT_CLASS CCurveEffect : public CCurveView
|
|
|
{
|
|
|
public:
|
|
|
CCurveEffect();
|
|
|
virtual ~CCurveEffect();
|
|
|
|
|
|
virtual void Serialize(CArchive& ar, const short &ver);
|
|
|
virtual int Read(CFile &fr, const short &ver);
|
|
|
virtual void Write( CFile &fw, const short &ver, double cc );
|
|
|
virtual void Draw(CXyDC &dc,CCurveEx *curve);
|
|
|
|
|
|
virtual void WriteDML(CFile &fw, const short &ver, double cc, int nBaseTabNum);
|
|
|
virtual int ReadDML(CFile &fr, const short &ver, void* pXmlParse);
|
|
|
|
|
|
virtual void WritePCG(CFile &fw, const short &ver, double cc, int nBaseTabNum);
|
|
|
virtual int ReadPCG(CFile &fr, const short &ver, void* pXmlParse);
|
|
|
|
|
|
void operator=(CCurveEffect& ce);
|
|
|
|
|
|
void Clear();
|
|
|
void CreateColor(int num);
|
|
|
void CreateColor(COLORREF beginColor, COLORREF endColor);
|
|
|
BOOL CreateColorBase(CColorBase& cb);
|
|
|
|
|
|
enum enStyleEffect
|
|
|
{
|
|
|
styleHorizonal = 0x00000001, //水平
|
|
|
styleVertical = 0x00000002, //垂直
|
|
|
styleDiagonalUp = 0x00000004, //斜上
|
|
|
styleDiagonalDown = 0x00000008, //斜下
|
|
|
styleCornerDiagonalUp = 0x00000010, //角部辐射(斜上)
|
|
|
styleCornerDiagonalDown = 0x00000020, //角部辐射(斜下)
|
|
|
styleCenter = 0x00000040 //中心辐射
|
|
|
};
|
|
|
|
|
|
protected:
|
|
|
virtual void DoFillContent(CXyDC& dc, CRect8 range);
|
|
|
|
|
|
//按照平行于直角边进行分割,然后填充三角形与矩形
|
|
|
void GradientFillX_Cathetus(CXyDC& dc, CColorBase& cb, CPoint2D& pt1, CPoint2D& pt2, CPoint2D& pt3, double dis); //填充三角形
|
|
|
void GradientFillY_Cathetus(CXyDC& dc, CColorBase& cb, CPoint2D& pt1, CPoint2D& pt2, CPoint2D& pt3, double dis); //填充三角形
|
|
|
|
|
|
//按照平行于斜边进行分割,然后填充三角形与矩形
|
|
|
void GradientFillX_Hypotenuse(CXyDC& dc, CColorBase& cb, CPoint2D& pt1, CPoint2D& pt2, CPoint2D& pt3, double dis); //填充三角形
|
|
|
void GradientFillY_Hypotenuse(CXyDC& dc, CColorBase& cb, CPoint2D& pt1, CPoint2D& pt2, CPoint2D& pt3, double dis); //填充三角形
|
|
|
|
|
|
public:
|
|
|
DWORD m_nEffectFlags;
|
|
|
int num;
|
|
|
COLORREF* m_pColor;
|
|
|
public:
|
|
|
virtual int ReadPCG( const short &ver, void* pXmlParse);
|
|
|
};
|
|
|
|
|
|
//在曲线范围的中心处上名字
|
|
|
class AFX_EXT_CLASS CCurveCenterName : public CCurveName
|
|
|
{
|
|
|
public:
|
|
|
CCurveCenterName();
|
|
|
virtual ~CCurveCenterName();
|
|
|
|
|
|
virtual void Serialize(CArchive& ar, const short &ver);
|
|
|
virtual int Read(CFile &fr, const short &ver);
|
|
|
virtual void Write( CFile &fw, const short &ver, double cc );
|
|
|
virtual void Draw(CXyDC &dc,CCurveEx *curve);
|
|
|
|
|
|
virtual void WriteDML(CFile &fw, const short &ver, double cc, int nBaseTabNum);
|
|
|
virtual int ReadDML(CFile &fr, const short &ver, void* pXmlParse);
|
|
|
|
|
|
virtual void WritePCG(CFile &fw, const short &ver, double cc, int nBaseTabNum);
|
|
|
virtual void WritePCG2(CFile &fw, const short &ver, double cc, int nBaseTabNum);
|
|
|
virtual int ReadPCG(CFile &fr, const short &ver, void* pXmlParse);
|
|
|
|
|
|
void operator=(CCurveCenterName& ce);
|
|
|
|
|
|
CPoint2D GetCenterPoint(CCurveEx* pCurve);
|
|
|
|
|
|
public:
|
|
|
virtual int ReadPCG( const short &ver, void* pXmlParse);
|
|
|
};
|
|
|
|
|
|
};
|
|
|
|
|
|
|