Draw1.h
资源名称:基本GIS系统开发.rar [点击查看]
上传用户:yklx818
上传日期:2013-04-13
资源大小:459k
文件大小:2k
源码类别:
GIS编程
开发平台:
Visual C++
- // Draw1.h: interface for the CDraw class.
- //
- //////////////////////////////////////////////////////////////////////
- #if !defined(AFX_DRAW1_H__77F4D1B5_513A_4692_A5E6_04369B44F81E__INCLUDED_)
- #define AFX_DRAW1_H__77F4D1B5_513A_4692_A5E6_04369B44F81E__INCLUDED_
- #if _MSC_VER > 1000
- #pragma once
- #endif // _MSC_VER > 1000
- #include"data.h"
- class CDraw : public CObject
- {
- protected:
- short m_ColorPen;
- short m_ColorBrush;//填充颜色
- float m_LineWide;
- short m_LineType;
- short m_Layer;
- BOOL b_Delete;
- int m_id_only;
- virtual void CalLong();
- virtual void CalArea();
- public:
- CDraw()
- {
- b_Delete = FALSE;
- }
- CDraw(short ColorPen,short ColorBrush,float LineWide,short LineType,short Layer,int id_only,BOOL Delete)
- {
- m_ColorPen=ColorPen;
- m_ColorBrush=ColorBrush;
- m_LineWide=LineWide;
- m_LineType=LineType;
- m_Layer=Layer;
- b_Delete=Delete;
- m_id_only=id_only;
- }
- int GetID()
- {
- return (m_id_only);
- }
- virtual ~CDraw();
- virtual void Draw(CDC* pDC,int m_DrawMode,int m_DrawModel,short BackColor)=0;
- virtual BOOL IsPoint(float x,float y,float j1,float blc)=0;
- virtual void GetRect(float* minX,float* minY,float* maxX,float*maxY)=0;
- float PointLine(float xx,float yy,float x1,float y1,float x2,float y2);
- float CalDisp(float x1,float y1,float x2,float y2);//计算两点距离
- BOOL PointRgn(float x,float y,int Numble,PointStruct* PointList,float blc);//判断点是否在初始化的区域内
- virtual void Move(float x_Move,float y_Move)=0;
- //点旋转操作函数
- void RotatePoint(float baseX,float baseY,float angle,float* xx,float *yy);
- float GetAngle(float baseX,float baseY,float xx,float yy);
- //图形元素的旋转计算
- virtual void Rotate(float baseX,float baseY,float angle)=0;
- //删除图形元素
- void Delete(BOOL bDelete);
- virtual BOOL IsFill();
- };
- #endif // !defined(AFX_DRAW1_H__77F4D1B5_513A_4692_A5E6_04369B44F81E__INCLUDED_)
- extern void DPtoVP(float x,float y,int *X,int *Y);
- extern void VPtoDP(int x,int y,float *X,float *Y);
- extern int DLtoVL(float l);
- extern float VLtoDL(int l);