You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
36 lines
1.2 KiB
C++
36 lines
1.2 KiB
C++
#pragma once
|
|
#include "module.h"
|
|
#include "EnumPropertieType.h"
|
|
|
|
//管理激光的工作范围
|
|
class CWorkAreaMgr :public CModule
|
|
{
|
|
public:
|
|
CWorkAreaMgr(void);
|
|
~CWorkAreaMgr(void);
|
|
virtual MODULE GetModuleType(){return _WORK_AREA_PROP;};
|
|
virtual CMFCPropertyGridProperty *CreatGridProperty();
|
|
virtual void OnAppInitialize();
|
|
|
|
//响应属性的改变
|
|
virtual void OnPropertyChanged();
|
|
virtual void Draw(CDC* pDC);
|
|
|
|
DbRect GetWorkArea();
|
|
void SetbDrawWorkArea(bool b){m_bDrawWorkArea = b;};
|
|
bool IsPtInWorkArea(Dbxy pt);
|
|
private:
|
|
void RefrashWorkArea();
|
|
void DrawWorkArea(CDC* pDC);
|
|
private:
|
|
bool m_bDrawWorkArea;//是否绘制工作区域
|
|
bool m_bCircle;//是否为圆形
|
|
bool m_bFrame;//是否只显示边框
|
|
COLORREF m_WorkRectColor; //工作区域方框颜色
|
|
|
|
Dbxy m_CenterPt;//范围的中心点坐标
|
|
DbSize m_WorkRectSize;//工作区域方框尺寸
|
|
DbRect m_DbWorkRect;//设备的安全加工范围,obj 的数据不能超过这个范围
|
|
};
|
|
|
|
extern CWorkAreaMgr *gWorkAreaMgr; |