当前位置: 首页>>代码示例>>C++>>正文


C++ Drawing::AddPoint方法代码示例

本文整理汇总了C++中Drawing::AddPoint方法的典型用法代码示例。如果您正苦于以下问题:C++ Drawing::AddPoint方法的具体用法?C++ Drawing::AddPoint怎么用?C++ Drawing::AddPoint使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在Drawing的用法示例。


在下文中一共展示了Drawing::AddPoint方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。

示例1: Run

	void Run(){
		wxGetApp().m_digitizing->digitized_point = DigitizedPoint(line_for_tool->A->m_p, DigitizeInputType);
		Drawing *pDrawingMode = dynamic_cast<Drawing *>(wxGetApp().input_mode_object);
		if (pDrawingMode != NULL)
		{
			pDrawingMode->AddPoint();
		}
	}
开发者ID:CarlosGS,项目名称:heekscad,代码行数:8,代码来源:HLine.cpp

示例2: Run

	void Run()
	{
		CBox box;
		sketch_for_tools->GetBox(box);
		double centre[3];
		box.Centre(centre);		

		wxGetApp().m_digitizing->digitized_point = DigitizedPoint(gp_Pnt(box.MinX(), centre[1], centre[2]), DigitizeInputType);
		Drawing *pDrawingMode = dynamic_cast<Drawing *>(wxGetApp().input_mode_object);
		if (pDrawingMode != NULL)
		{
			pDrawingMode->AddPoint();
		}
	}
开发者ID:CarlosGS,项目名称:heekscad,代码行数:14,代码来源:Sketch.cpp

示例3: Run

	void Run(){
		wxGetApp().m_digitizing->digitized_point = DigitizedPoint(which->m_p, DigitizeInputType);
		Drawing *pDrawingMode = dynamic_cast<Drawing *>(wxGetApp().input_mode_object);
		if (pDrawingMode != NULL)
		{
			pDrawingMode->AddPoint();
		}

		DigitizeMode *pDigitizeMode = dynamic_cast<DigitizeMode *>(wxGetApp().input_mode_object);
		if (pDigitizeMode != NULL)
		{
			// Tell the DigitizeMode class that we're specifying the
			// location rather than the mouse location over the graphics window.

			pDigitizeMode->DigitizeToLocatedPosition( which->m_p );
		}
	}
开发者ID:DavidNicholls,项目名称:heekscad,代码行数:17,代码来源:HPoint.cpp

示例4: Run

	void Run(){
		Drawing *pDrawingMode = dynamic_cast<Drawing *>(wxGetApp().input_mode_object);
		if (pDrawingMode != NULL)
		{
			wxString message(_("Enter offset in X,Y,Z format (with commas between them)"));
			wxString caption(_("Apply Offset To Selected Location"));
			wxString default_value(_T("0,0,0"));

			wxString value = wxGetTextFromUser(message, caption, default_value);
			wxStringTokenizer tokens(value,_T(" :,\t\n"));
			
			gp_Pnt location(which->m_p);
			for (int i=0; i<3; i++)
			{
				if (tokens.HasMoreTokens())
				{
					double offset = 0.0;
					wxString token = tokens.GetNextToken();
					if (token.ToDouble(&offset))
					{
						offset *= wxGetApp().m_view_units;
						switch(i)
						{
						case 0: 
							location.SetX( location.X() + offset );
							break;

						case 1:
							location.SetY( location.Y() + offset );
							break;

						case 2:
							location.SetZ( location.Z() + offset );
							break;
						}
						
					}
				}
			}

			wxGetApp().m_digitizing->digitized_point = DigitizedPoint(location, DigitizeInputType);
			pDrawingMode->AddPoint();
		}
	}
开发者ID:CarlosGS,项目名称:heekscad,代码行数:44,代码来源:HPoint.cpp

示例5: Run

	void Run()
	{
		wxGetApp().m_digitizing->digitized_point.m_type = DigitizeInputType;
		m_drawing->AddPoint();
	}
开发者ID:CarlosGS,项目名称:heekscad,代码行数:5,代码来源:Drawing.cpp


注:本文中的Drawing::AddPoint方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。