Circle.h
资源名称:44757463.rar [点击查看]
上传用户:lj3531212
上传日期:2007-06-18
资源大小:346k
文件大小:3k
源码类别:
绘图程序
开发平台:
Visual C++
- // Circle.h: interface for the CCircle class.
- //
- //////////////////////////////////////////////////////////////////////
- #if !defined(AFX_CIRCLE_H__446D565F_BE14_425B_983B_4D18B7FBC987__INCLUDED_)
- #define AFX_CIRCLE_H__446D565F_BE14_425B_983B_4D18B7FBC987__INCLUDED_
- #if _MSC_VER > 1000
- #pragma once
- #endif // _MSC_VER > 1000
- #include "Shape.h"
- class CCircle : public CShape
- {
- DECLARE_SERIAL(CCircle)
- /////////////////////////////////////
- public:
- public:
- CCircle();
- CCircle(COLORREF color,int penWidth,float angle);
- CCircle(CCircle * const pCircle);
- virtual ~CCircle();
- public:
- //virtual operations
- virtual void Serialize( CArchive& );
- virtual void SetPtData(CArray<float,float>& flArrayX,CArray<float,float>& flArrayY);
- virtual void GetPtData(CArray<float,float>& flArrayX,CArray<float,float>& flArrayY);
- virtual void Draw(CDC *pDC,COLORREF color,COLORREF fillColor,int penWidth);
- virtual void DrawPoints(CDC *pDC,COLORREF color);
- virtual void DrawPointsCutTo(CDC *pDC,COLORREF color,CFlRect m_rectFrom,CRect m_rectTo);
- virtual int IsPointinRegion(POINT point);
- virtual void CreatGraph(CArray<CPoint,CPoint>& ptArray,int nPenWidth,COLORREF color,COLORREF fillColor,SHAPE_FILLSTYLE nStyle=_shape_none_fill);
- virtual void CreatGraph(CArray<float,float>& flArrayX,CArray<float,float>& flArrayY,int nPenWidth,COLORREF color,COLORREF fillColor,SHAPE_FILLSTYLE nStyle=_shape_none_fill);
- virtual void DrawCutToRect(CDC *pDC,COLORREF color,COLORREF fillColor,int penWidth,CFlRect m_rectFrom,CRect m_rectTo);
- virtual void Move(CDC *pDC,float stepx,float stepy);
- virtual void PartMove(CDC *pDC,float PrevX,float PrevY,float CurX,float CurY);
- virtual void Rotate(CDC *pDC,float CX,float CY,float flAngle);
- virtual void Magnify(CDC *pDC,float CX,float CY,float flScale);
- //在矩形内上下反转
- virtual void TopToBottom(CDC* pDC,CRect rect);
- //在矩形内左右反转
- virtual void LeftToRight(CDC* pDC,CRect rect);
- virtual CShape* GetCopy();
- virtual void ExPort(FILE* outStream);//增加导出txt功能时用
- virtual void ImPort(FILE* InStream);
- virtual CString GetNameString();
- virtual GRAPH_SHAPE_TYPE GetShapeKind(){
- return _shape_Circle;
- }
- virtual void RefreshData(bool bRefresh);
- virtual int IsInRect(CRect rect);
- virtual CRect GetBoundaryRect();
- virtual CPoint GetCenterPoint();
- virtual int GetPtState(float flx,float fly,float flRate);
- //Begin of deletion
- //For Project GraphSoft,delete by FNST)Xiagongli 2004.3.31
- //virtual int GetPointNum(){
- // return 4;
- //}
- //end of deletion
- protected:
- void BreCircle(CDC *pDC,CPoint m_pCenter,int nRadius,COLORREF color,int nPenWidth);
- void FillBreCircle(CDC *pDC,CPoint ptCenter,int flRadius,int penWidth);
- ////////////////////
- private:
- //save(start)
- float m_flRadius;
- float m_flCenterx;
- float m_flCentery;
- //save(end)
- //not save(start)
- //temp(start)
- float m_flRadiusTemp;
- float m_flCenterxTemp;
- float m_flCenteryTemp;
- //temp(end)
- //not save(end)
- };
- #endif // !defined(AFX_CIRCLE_H__446D565F_BE14_425B_983B_4D18B7FBC987__INCLUDED_)