本文整理汇总了C++中DRAWSEGMENT::GetPosition方法的典型用法代码示例。如果您正苦于以下问题:C++ DRAWSEGMENT::GetPosition方法的具体用法?C++ DRAWSEGMENT::GetPosition怎么用?C++ DRAWSEGMENT::GetPosition使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类DRAWSEGMENT
的用法示例。
在下文中一共展示了DRAWSEGMENT::GetPosition方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: ConvertOutlineToPolygon
//.........这里部分代码省略.........
pt.x -= graphic->GetRadius();
// when the radius <= 0, this is a mal-formed circle. Skip it
if( graphic->GetRadius() > 0 && pt.x < xmin.x )
{
xmin = pt;
xmini = i;
}
}
break;
case S_CURVE:
{
graphic->RebuildBezierToSegmentsPointsList( graphic->GetWidth() );
for( unsigned int jj = 0; jj < graphic->GetBezierPoints().size(); jj++ )
{
wxPoint pt = graphic->GetBezierPoints()[jj];
if( pt.x < xmin.x )
{
xmin = pt;
xmini = i;
}
}
}
break;
case S_POLYGON:
{
const auto poly = graphic->GetPolyShape();
MODULE* module = aSegList[0]->GetParentModule();
double orientation = module ? module->GetOrientation() : 0.0;
VECTOR2I offset = module ? module->GetPosition() : VECTOR2I( 0, 0 );
for( auto iter = poly.CIterate(); iter; iter++ )
{
auto pt = *iter;
RotatePoint( pt, orientation );
pt += offset;
if( pt.x < xmin.x )
{
xmin.x = pt.x;
xmin.y = pt.y;
xmini = i;
}
}
}
break;
default:
break;
}
}
// Grab the left most point, assume its on the board's perimeter, and see if we
// can put enough graphics together by matching endpoints to formulate a cohesive
// polygon.
graphic = (DRAWSEGMENT*) segList[xmini];
// The first DRAWSEGMENT is in 'graphic', ok to remove it from 'items'
segList.erase( segList.begin() + xmini );
// Output the Edge.Cuts perimeter as circle or polygon.
if( graphic->GetShape() == S_CIRCLE )