|
|
|
|
|
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
|
|
|
|
|
//PointSegment.h
|
|
|
|
|
|
|
|
|
|
|
|
#pragma once
|
|
|
|
|
|
|
|
|
|
|
|
#include "CommonDefines.h"
|
|
|
|
|
|
|
|
|
|
|
|
class CBezierStyleDrawPointSegment
|
|
|
|
|
|
{//һ<><D2BB>Bezier<65><72><EFBFBD><EFBFBD>
|
|
|
|
|
|
public:
|
|
|
|
|
|
CBezierStyleDrawPointSegment(POINT* point=NULL,int count=0,FACIESSEGMENTDIRECTION direction=segmentforward,BOOL bSmoothConnection=FALSE);
|
|
|
|
|
|
~CBezierStyleDrawPointSegment();
|
|
|
|
|
|
|
|
|
|
|
|
int m_count;
|
|
|
|
|
|
POINT* m_point;
|
|
|
|
|
|
|
|
|
|
|
|
//m_index0<m_index1<78><31>ʾ<EFBFBD><CABE><EFBFBD><EFBFBD> m_index0>m_index1<78><31>ʾΪ<CABE><CEAA><EFBFBD><EFBFBD>
|
|
|
|
|
|
FACIESSEGMENTDIRECTION m_direction;
|
|
|
|
|
|
|
|
|
|
|
|
BOOL m_bSmoothConnection;//<2F><><EFBFBD><EFBFBD>һ<EFBFBD>εĽӺϴ<D3BA><CFB4>Ƿ<EFBFBD>ƽ<EFBFBD><C6BD>
|
|
|
|
|
|
|
|
|
|
|
|
int m_iType;
|
|
|
|
|
|
|
|
|
|
|
|
void SetParameter(POINT* point=NULL,int count=0,FACIESSEGMENTDIRECTION direction=segmentforward,BOOL bSmoothConnection=FALSE);
|
|
|
|
|
|
|
|
|
|
|
|
void SetSmoothConnection(BOOL bValue);
|
|
|
|
|
|
BOOL GetSmoothConnection();
|
|
|
|
|
|
|
|
|
|
|
|
BOOL GetPoint(int index,POINT& point);
|
|
|
|
|
|
BOOL GetPoint(int index,POINT& p0,POINT& p1,POINT& p2);//<2F><><EFBFBD><EFBFBD>Bezier<65><72><EFBFBD><EFBFBD>
|
|
|
|
|
|
BOOL GetPoint(int index,POINT& p0,POINT& p1,POINT& p2,POINT& p3);//<2F><><EFBFBD><EFBFBD>Bezier<65><72><EFBFBD><EFBFBD>
|
|
|
|
|
|
|
|
|
|
|
|
void Reverse();
|
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
class CBezierStyleDrawPointSegmentArray
|
|
|
|
|
|
{
|
|
|
|
|
|
public:
|
|
|
|
|
|
CBezierStyleDrawPointSegmentArray();
|
|
|
|
|
|
~CBezierStyleDrawPointSegmentArray();
|
|
|
|
|
|
BOOL m_bClose;
|
|
|
|
|
|
int m_iPointCount;
|
|
|
|
|
|
CArray<CBezierStyleDrawPointSegment,CBezierStyleDrawPointSegment> m_segmentarray;
|
|
|
|
|
|
public:
|
|
|
|
|
|
BOOL GetClose();
|
|
|
|
|
|
void SetClose(BOOL bValue);
|
|
|
|
|
|
|
|
|
|
|
|
void AddSegment(POINT* point,int count,FACIESSEGMENTDIRECTION direction,BOOL bSmoothConnection=FALSE);
|
|
|
|
|
|
void AddSegment(CBezierStyleDrawPointSegment& segment);
|
|
|
|
|
|
void AddSegment(CBezierStyleDrawPointSegmentArray& segmentarray);
|
|
|
|
|
|
|
|
|
|
|
|
void InsertSegment(int index,POINT* point,int count,FACIESSEGMENTDIRECTION direction,BOOL bSmoothConnection=FALSE);
|
|
|
|
|
|
|
|
|
|
|
|
void DeleteSegment(int index);
|
|
|
|
|
|
|
|
|
|
|
|
void SetSegment(int index,POINT* point,int count,FACIESSEGMENTDIRECTION direction,BOOL bSmoothConnection=FALSE);
|
|
|
|
|
|
|
|
|
|
|
|
int GetSegmentCount();
|
|
|
|
|
|
CBezierStyleDrawPointSegment* GetSegmentArray();
|
|
|
|
|
|
CBezierStyleDrawPointSegment* GetSegment(int index);
|
|
|
|
|
|
|
|
|
|
|
|
BOOL GetPoint(int index,POINT& point);
|
|
|
|
|
|
BOOL GetPoint(int index,POINT& p0,POINT& p1,POINT& p2);
|
|
|
|
|
|
BOOL GetPoint(int index,POINT& p0,POINT& p1,POINT& p2,POINT& p3);
|
|
|
|
|
|
|
|
|
|
|
|
BOOL GetPoint(double dIndex,POINT& point);
|
|
|
|
|
|
BOOL GetCutPoint(double index,POINT* point);
|
|
|
|
|
|
BOOL GetCutPoint(double dHeadIndex,POINT* headcutpoint,double dEndIndex,POINT* endcutpoint,FACIESSEGMENTDIRECTION direction);
|
|
|
|
|
|
|
|
|
|
|
|
void Clear();
|
|
|
|
|
|
|
|
|
|
|
|
int GetPointCount();
|
|
|
|
|
|
|
|
|
|
|
|
void operator=(CBezierStyleDrawPointSegmentArray& segmentarray);
|
|
|
|
|
|
|
|
|
|
|
|
void GetPointArray(CArray<POINT,POINT>& pointarray);
|
|
|
|
|
|
|
|
|
|
|
|
void SetSize(int iValue);
|
|
|
|
|
|
|
|
|
|
|
|
void Reverse();
|
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
class CBezierStyleMapPointSegment
|
|
|
|
|
|
{//һ<><D2BB>Bezier<65><72><EFBFBD><EFBFBD>
|
|
|
|
|
|
public:
|
|
|
|
|
|
CBezierStyleMapPointSegment(CPoint2D* point=NULL,int count=0,FACIESSEGMENTDIRECTION direction=segmentforward,BOOL bSmoothConnection=FALSE);
|
|
|
|
|
|
~CBezierStyleMapPointSegment();
|
|
|
|
|
|
|
|
|
|
|
|
int m_count;
|
|
|
|
|
|
CPoint2D* m_point;
|
|
|
|
|
|
|
|
|
|
|
|
FACIESSEGMENTDIRECTION m_direction;
|
|
|
|
|
|
int m_index1;
|
|
|
|
|
|
|
|
|
|
|
|
BOOL m_bSmoothConnection;
|
|
|
|
|
|
|
|
|
|
|
|
int m_iType;
|
|
|
|
|
|
|
|
|
|
|
|
void SetParameter(CPoint2D* point=NULL,int count=0,FACIESSEGMENTDIRECTION direction=segmentforward,BOOL bSmoothConnection=FALSE);
|
|
|
|
|
|
|
|
|
|
|
|
void SetSmoothConnection(BOOL bValue);
|
|
|
|
|
|
BOOL GetSmoothConnection();
|
|
|
|
|
|
|
|
|
|
|
|
BOOL GetPoint(int index,CPoint2D& point);
|
|
|
|
|
|
BOOL GetPoint(int index,CPoint2D& p0,CPoint2D& p1,CPoint2D& p2);
|
|
|
|
|
|
BOOL GetPoint(int index,CPoint2D& p0,CPoint2D& p1,CPoint2D& p2,CPoint2D& p3);
|
|
|
|
|
|
|
|
|
|
|
|
void Reverse();
|
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
class CBezierStyleMapPointSegmentArray
|
|
|
|
|
|
{
|
|
|
|
|
|
public:
|
|
|
|
|
|
CBezierStyleMapPointSegmentArray();
|
|
|
|
|
|
~CBezierStyleMapPointSegmentArray();
|
|
|
|
|
|
BOOL m_bClose;
|
|
|
|
|
|
int m_iPointCount;
|
|
|
|
|
|
CArray<CBezierStyleMapPointSegment,CBezierStyleMapPointSegment> m_segmentarray;
|
|
|
|
|
|
public:
|
|
|
|
|
|
BOOL GetClose();
|
|
|
|
|
|
void SetClose(BOOL bValue);
|
|
|
|
|
|
|
|
|
|
|
|
void AddSegment(CPoint2D* point,int count,FACIESSEGMENTDIRECTION direction,BOOL bSmoothConnection=FALSE);
|
|
|
|
|
|
void AddSegment(CBezierStyleMapPointSegment& segment);
|
|
|
|
|
|
void AddSegment(CBezierStyleMapPointSegmentArray& segmentarray);
|
|
|
|
|
|
|
|
|
|
|
|
void InsertSegment(int index,CPoint2D* point,int count,FACIESSEGMENTDIRECTION direction,BOOL bSmoothConnection=FALSE);
|
|
|
|
|
|
|
|
|
|
|
|
void DeleteSegment(int index);
|
|
|
|
|
|
|
|
|
|
|
|
void SetSegment(int index,CPoint2D* point,int count,FACIESSEGMENTDIRECTION direction,BOOL bSmoothConnection=FALSE);
|
|
|
|
|
|
|
|
|
|
|
|
int GetSegmentCount();
|
|
|
|
|
|
CBezierStyleMapPointSegment* GetSegmentArray();
|
|
|
|
|
|
CBezierStyleMapPointSegment* GetSegment(int index);
|
|
|
|
|
|
|
|
|
|
|
|
BOOL GetPoint(int index,CPoint2D& point);
|
|
|
|
|
|
BOOL GetPoint(int index,CPoint2D& p0,CPoint2D& p1,CPoint2D& p2);//<2F><><EFBFBD><EFBFBD>Bezier<65><72><EFBFBD><EFBFBD>
|
|
|
|
|
|
BOOL GetPoint(int index,CPoint2D& p0,CPoint2D& p1,CPoint2D& p2,CPoint2D& p3);//<2F><><EFBFBD><EFBFBD>Bezier<65><72><EFBFBD><EFBFBD>
|
|
|
|
|
|
|
|
|
|
|
|
BOOL GetPoint(double dIndex,CPoint2D& point);
|
|
|
|
|
|
BOOL GetCutPoint(double index,CPoint2D* point);
|
|
|
|
|
|
BOOL GetCutPoint(double dHeadIndex,CPoint2D* headcutpoint,double dEndIndex,CPoint2D* endcutpoint,FACIESSEGMENTDIRECTION direction);
|
|
|
|
|
|
|
|
|
|
|
|
void Clear();
|
|
|
|
|
|
|
|
|
|
|
|
int GetPointCount();
|
|
|
|
|
|
|
|
|
|
|
|
void operator=(CBezierStyleMapPointSegmentArray& segmentarray);
|
|
|
|
|
|
|
|
|
|
|
|
void GetPointArray(CArray<CPoint2D,CPoint2D>& pointarray);
|
|
|
|
|
|
void GetPointArray(CArray<POINT,POINT>& pointarray,double dZoomFactor);
|
|
|
|
|
|
|
|
|
|
|
|
void SetSize(int iValue);
|
|
|
|
|
|
|
|
|
|
|
|
void Reverse();
|
|
|
|
|
|
};
|