|
|
|
|
|
//////////////////////////////////////////////////////////////////////////////
|
|
|
//文件 HowToViewCurve.h
|
|
|
//主要功能:
|
|
|
//
|
|
|
//程序编写: 2005-12-07
|
|
|
/////////////////////////////////////////////////////////////////////////////
|
|
|
|
|
|
#pragma once
|
|
|
#include "CurvePlay.h"
|
|
|
using namespace NCurveEmbellish;
|
|
|
|
|
|
#define VIEWCURVE_DRAW_SOURCE_CURVE 0x00000001 //画源曲线
|
|
|
|
|
|
/**
|
|
|
* 曲线修饰列表
|
|
|
*/
|
|
|
class AFX_EXT_CLASS CHowToViewCurve
|
|
|
{
|
|
|
public:
|
|
|
CHowToViewCurve(void);
|
|
|
virtual ~CHowToViewCurve(void);
|
|
|
|
|
|
protected:
|
|
|
CArray<CCurveView*,CCurveView*> value;
|
|
|
DWORD m_nFlags;
|
|
|
CString name; //修饰名称,为了根据名称查找修饰
|
|
|
|
|
|
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=1.0);
|
|
|
BOOL WriteMemory(BYTE*& outBuffer, int& destLen, int formatCode);
|
|
|
BOOL ReadMemory(BYTE* bufData, int bufLen, int formatCode);
|
|
|
virtual void WriteDML(CFile &fw, const short& ver, double cc=1.0, int nBaseTabNum=1);
|
|
|
virtual int ReadDML(CFile &fr, const short &ver);
|
|
|
|
|
|
virtual void WritePCG(CFile &fw, const short& ver, double cc=1.0, int nBaseTabNum=1);
|
|
|
virtual int ReadPCG(CFile &fr, const short &ver);
|
|
|
|
|
|
CArray<CCurveView*,CCurveView*>* GetValueArray(void);
|
|
|
void GetNewUsing(CStringList &list);
|
|
|
int PositionNew(int bReplace=1);//bReaplce=TRUE时表示符号不为空才重新定位,否则不管是否为空都重新定位
|
|
|
|
|
|
BOOL IsOnlySolid(); //修饰中仅有充填属性
|
|
|
BOOL IsSolid();
|
|
|
BOOL IsClose();
|
|
|
int IsSmooth(int nBezierOrSpline); //1=Bezier, 2=Spline, 3=Bezier And Spline
|
|
|
int IsSmoothClose(int nBezierOrSpline); //
|
|
|
|
|
|
void Empty();
|
|
|
void RemoveAt(int nIndex);
|
|
|
void Free(CCurveView* pCurveView);
|
|
|
void ScaleProperty(double sx, double sy);
|
|
|
void operator = (CHowToViewCurve & t );
|
|
|
|
|
|
CCurveView* SetAt(int nIndex, CCurveView* pcv);
|
|
|
CCurveView* SetAt(int nIndex, BYTE* bufData, int bufLen, int formatCode);
|
|
|
CCurveView* GetAt(int index);
|
|
|
|
|
|
int Add(CCurveView* cv);
|
|
|
int GetCount(void);
|
|
|
|
|
|
void EnableDrawSourceCurve(BOOL bEnable);
|
|
|
BOOL IsDrawSourceCurve(void);
|
|
|
|
|
|
CString GetName(void);
|
|
|
void SetName(CString name);
|
|
|
|
|
|
BOOL MoveUp(int nIndex);
|
|
|
BOOL MoveDown(int nIndex);
|
|
|
|
|
|
int Replace(COLORREF cOldColor, COLORREF cNewColor);
|
|
|
int SetColor(COLORREF cNewColor); //设置所有的文字、曲线等颜色
|
|
|
|
|
|
//COLORREF frColorSymbol; // 符号前景颜色
|
|
|
//COLORREF bkColorSymbol; // 符号背景充填颜色
|
|
|
public:
|
|
|
virtual int ReadPCG(void *pxp, const short &ver);
|
|
|
};
|