本文整理汇总了C++中Contour::Reverse方法的典型用法代码示例。如果您正苦于以下问题:C++ Contour::Reverse方法的具体用法?C++ Contour::Reverse怎么用?C++ Contour::Reverse使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Contour
的用法示例。
在下文中一共展示了Contour::Reverse方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: Init
//.........这里部分代码省略.........
strcpy(limitRightDistanceList,"*\0");
strcpy(limitZTraceList,"*\0");
PointContours = new Contours(); // set pixel offset values for stamp tool contours
contour = new Contour();
PointContours->Add( contour );
sprintf(contour->name,"a$+"); // orange
contour->mode = R2_COPYPEN;
contour->simplified = true;
contour->border = Color( 1.0, 0.5, 0.0 );
contour->fill = Color( 1.0, 0.5, 0.0 );
contour->points = new Points(); // hexagonal shape
int hexagon[] = { -3, 1, -3, -1, -1, -3, 1, -3, 3, -1, 3, 1, 1, 3, -1, 3 };
for ( i=0; i<16; i=i+2 )
{
p = new Point((double)hexagon[i],(double)hexagon[i+1],0.0);
contour->points->Add(p);
}
contour = new Contour();
PointContours->Add( contour );
sprintf(contour->name,"b$+"); // purple
contour->mode = R2_COPYPEN;
contour->simplified = true;
contour->border = Color( 0.5, 0.0, 1.0 );
contour->fill = Color( 0.5, 0.0, 1.0 );
contour->points = new Points(); // 8-star shape
int star[] = { -4, 4, -1, 2, 0, 5, 1, 2, 4, 4, 2, 1, 5, 0, 2, -1, 4, -4, 1, -2, 0, -5, -1, -2, -4, -4, -2, -1, -5, 0, -2, 1 };
for ( i=0; i<32; i=i+2 )
{
p = new Point((double)star[i],(double)star[i+1],0.0);
contour->points->Add(p);
}
contour->Reverse(); // make for clockwise creation
contour = new Contour();
PointContours->Add( contour );
sprintf(contour->name,"pink$+"); // pink
contour->mode = -R2_COPYPEN;
contour->simplified = true;
contour->border = Color( 1.0, 0.0, 0.5 );
contour->fill = Color( 1.0, 0.0, 0.5 );
contour->points = new Points(); // trianglar shape
int triangle[] = { -6, -6, 6, -6, 0, 5 };
for ( i=0; i<6; i=i+2 )
{
p = new Point((double)triangle[i],(double)triangle[i+1],0.0);
contour->points->Add(p);
}
contour = new Contour();
PointContours->Add( contour );
sprintf(contour->name,"X$+");
contour->mode = -R2_COPYPEN;
contour->simplified = true;
contour->border = Color( 1.0, 0.0, 0.0 ); // red
contour->fill = Color( 1.0, 0.0, 0.0 );
contour->points = new Points(); // x shape
int x[] = { -7, 7, -2, 0, -7, -7, -4, -7, 0, -1, 4, -7, 7, -7, 2, 0, 7, 7, 4, 7, 0, 1, -4, 7 };
for ( i=0; i<24; i=i+2 )
{
p = new Point((double)x[i],(double)x[i+1],0.0);
contour->points->Add(p);
}
contour = new Contour();