Esempio n. 1
0
void 
OrderedTask::Clear()
{
  while (task_points.size())
    ErasePoint(0);

  while (optional_start_points.size())
    EraseOptionalStartPoint(0);

  Reset();
  ordered_behaviour = task_behaviour.ordered_defaults;
  active_factory->UpdateOrderedTaskBehaviour(ordered_behaviour);
}
Esempio n. 2
0
	//函数功能:删除点
	//参数:
	long CMapEditor10View::DeletePntLBU(CPoint point)       
	{
		int pnum=0;
		CPoint ptemp;
		FindNearestPnt(point,pnum);
		ptemp.x=point.x;
		ptemp.y=point.y;

		if(DeletePnt(pnum)==1);								//文件中删除点
		{
			ErasePoint(point);							//图像中删除点
		}

		return 1;

	}
Esempio n. 3
0
bool
OrderedTask::Remove(const unsigned position)
{
  if (position >= task_points.size())
    return false;

  if (active_task_point > position ||
      (active_task_point > 0 && active_task_point == task_points.size() - 1))
    active_task_point--;

  ErasePoint(position);

  SetNeighbours(position);
  if (position)
    SetNeighbours(position - 1);

  UpdateGeometry();
  return true;
}
Esempio n. 4
0
void ParamSet::AddPoint(const string &name, const Point *data, int nItems) {
    ErasePoint(name);
    ADD_PARAM_TYPE(Point, points);
}
Esempio n. 5
0
	void CMapEditor10View::OnLButtonUp(UINT nFlags, CPoint point)
	{
		// TODO: 在此添加消息处理程序代码和/或调用默认值


		switch(GCurOperState)
		{
		case OPERSTATE_INPUT_PNT:						//造点
			AppendPnt(point,pntColor);					//把新加的点写入临时文件
			DrawPoint(point,pntColor);					//画出当前的点
			break;	
		case OPERSTATE_DEL_PNT:							//删除点
			DeletePntLBU(point);
			break;
		case OPERSTATE_MOV_PNT:							//移动点
			MovePntLBU(point);							//文件中移动点   (移动到的点,要移动的点)
			Invalidate();								//刷新图像	
			break;
		case OPERSTATE_RECOVER_PNT:						//恢复点
			RecoverPnt(point);
			ErasePoint(point);
			break;
		case OPERSTATE_ZOOM_IN:			//设置操作状态为放大
			ZoomInLBU(point);
			break;
		case OPERSTATE_ZOOM_OUT:			//设置操作状态为缩小
			ZoomOutLBU(point);
			break;
		case OPERSTATE_CREAT_REG:			//设置操作状态为造区
			CreatRegLBU(point);
			break;
		case OPERSTATE_DELETE_REG:			//设置操作状态为删除区
			DeleteRegLBU(point);
			break;
		case OPERSTATE_MOVE_REG:			//设置操作状态为移动区
			MoveRegLBU(point);
			break;
		case OPERSTATE_WINDOW_MOVE:			//设置操作状态为窗口移动
			WindowMoveLBU(point);
			break;
		case OPERSTATE_RECOVER_REG:			//设置操作状态为恢复区
			RecoverDeletedRegLBU(point);
			break;
		case OPERSTATE_AMMENDPAR_REG:			//设置操作状态为修改区参数
			AmendRegPARLBU(point);
			break;
		case OPERSTATE_INPUT_LIN:						 //造线
			CreateLinLBU(point);
			break;
		case OPERSTATE_DEL_LIN:							//删除线
			DeleteLinLBU(point);
			break;
		case OPERSTATE_MOVE_LIN:								 //移动线
			MoveLinLBU(point);
			Invalidate();										//刷新图像
			break;		
		case OPERSTATE_CONNECT_LIN:								//连接线
			ConLinLBU(point);
			break;

		case OPERSTATE_RECOVER_LIN:								//恢复线
			RecoverLinLBU(point);
			break;
		default:

			break;
		}
		GLinChanged=1;
		CView::OnLButtonUp(nFlags, point);
	}