|
|
|
|
|
#pragma once
|
|
|
|
|
|
#ifndef DrawObject_h__
|
|
|
|
|
|
#define DrawObject_h__
|
|
|
|
|
|
|
|
|
|
|
|
#include "DrawOperator\baseextend.h"
|
|
|
|
|
|
#include "AbstractVisitor.h"
|
|
|
|
|
|
#include "commondefine.h"
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
namespace NChart
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
|
|
|
|
class CCompositeDrawingObject;
|
|
|
|
|
|
class AFX_EXT_CLASS CDrawingObject :
|
|
|
|
|
|
public CBaseExtend
|
|
|
|
|
|
{
|
|
|
|
|
|
public:
|
|
|
|
|
|
CDrawingObject(void);
|
|
|
|
|
|
virtual ~CDrawingObject(void);
|
|
|
|
|
|
void GetRange(CRect8& range);
|
|
|
|
|
|
BOOL IsInRange(CRect8& range);
|
|
|
|
|
|
void Offset(double dx, double dy);
|
|
|
|
|
|
void ScaleCoor(double xs, double ys, double dx, double dy);
|
|
|
|
|
|
void Rotate(double xs, double ys, double angle);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/** <20><><EFBFBD>ܷ<EFBFBD><DCB7><EFBFBD><EFBFBD><EFBFBD> */
|
|
|
|
|
|
virtual void Accept(CChartAbstractVisitor *pVisitor);
|
|
|
|
|
|
|
|
|
|
|
|
virtual void Draw(CXyDC &dc);
|
|
|
|
|
|
|
|
|
|
|
|
virtual void Serialize(CArchive& ar, const short &ver);
|
|
|
|
|
|
|
|
|
|
|
|
CString GetObjectName();
|
|
|
|
|
|
void SetObjectName(CString objName);
|
|
|
|
|
|
|
|
|
|
|
|
virtual CRect8 GetRect();
|
|
|
|
|
|
|
|
|
|
|
|
virtual CDrawingObject* HitTest(const CPoint2D& ptHit);
|
|
|
|
|
|
|
|
|
|
|
|
virtual void SetRect(const CRect8& rcClient);
|
|
|
|
|
|
|
|
|
|
|
|
virtual int OnLButtonDown(CXyDC &dc, CView *pView, UINT nFlags, CPoint2D &point);
|
|
|
|
|
|
virtual int OnLButtonUp(CXyDC &dc, CView *pView, UINT nFlags, CPoint2D &point);
|
|
|
|
|
|
virtual int OnLButtonDblClk(CXyDC &dc, CView *pView, UINT nFlags, CPoint2D &point);
|
|
|
|
|
|
virtual int OnMouseMove(CXyDC &dc, CView *pView, UINT nFlags, CPoint2D &point);
|
|
|
|
|
|
|
|
|
|
|
|
virtual void OnPosChange(int nDragHandle,CSize8 szChange);
|
|
|
|
|
|
|
|
|
|
|
|
void SetVisible(bool bVisible);
|
|
|
|
|
|
bool GetVisible();
|
|
|
|
|
|
|
|
|
|
|
|
bool GetMoveable();
|
|
|
|
|
|
void SetMoveable(bool bMoveable);
|
|
|
|
|
|
|
|
|
|
|
|
void SetRegion(CRect8 rcRegion);
|
|
|
|
|
|
CRect8 GetRegion();
|
|
|
|
|
|
DRAWOBJTYPE GetDrawingObjectType(){return m_drawObjType;}
|
|
|
|
|
|
CCompositeDrawingObject * GetContainer() const { return m_pContainer; }
|
|
|
|
|
|
void SetContainer(CCompositeDrawingObject * val) { m_pContainer = val; }
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
protected:
|
|
|
|
|
|
///* <20>õ<EFBFBD><C3B5><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ͱ<EFBFBD>ע<EFBFBD><D7A2><EFBFBD><EFBFBD>*/
|
|
|
|
|
|
void GetActureRect();
|
|
|
|
|
|
void Transform(CXyDC* pDC, float* matrix, BOOL bUndo);
|
|
|
|
|
|
void TransformPoint(float* matrix, double& x0, double& y0, BOOL bUndo);
|
|
|
|
|
|
|
|
|
|
|
|
protected:
|
|
|
|
|
|
CRect8 m_rcClient;
|
|
|
|
|
|
CString m_strObjectName;
|
|
|
|
|
|
CPoint2D m_ptOffset;
|
|
|
|
|
|
bool m_bVisible;
|
|
|
|
|
|
bool m_bMoveable;
|
|
|
|
|
|
CCompositeDrawingObject *m_pContainer;
|
|
|
|
|
|
//<2F><>ʾ<EFBFBD><CABE>Χ
|
|
|
|
|
|
CRect8 m_rcRegion;
|
|
|
|
|
|
DRAWOBJTYPE m_drawObjType;
|
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
}//namespace
|
|
|
|
|
|
|
|
|
|
|
|
using namespace NChart;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
#endif // DrawObject_h__
|