本文整理汇总了C++中Board2D::drawRectangle方法的典型用法代码示例。如果您正苦于以下问题:C++ Board2D::drawRectangle方法的具体用法?C++ Board2D::drawRectangle怎么用?C++ Board2D::drawRectangle使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Board2D
的用法示例。
在下文中一共展示了Board2D::drawRectangle方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: testSimpleBoard
/**
* Example of a test. To be completed.
*
*/
bool testSimpleBoard()
{
unsigned int nbok = 0;
unsigned int nb = 2;
trace.beginBlock ( "Testing class SimpleBoard" );
Board2D board;
board.setPenColorRGBi( 0, 0, 0);
board.drawRectangle( -1, 1, 2.0, 2.0 );
board.setPenColorRGBi( 0, 0, 255 );
board.fillCircle( 2, 2, 1 );
board.saveSVG( "simpleboard.svg" );
board.saveFIG( "simpleboard.fig" );
board.saveEPS( "simpleboard.eps" );
board.saveTikZ( "simpleboard.tikz" );
nbok++;
typedef PointVector<2,int> Point2D;
Point2D apoint, p2;
apoint[0] = 5;
p2[0] = 1;
apoint[1] = 8;
p2[1] = 1;
board.setPenColorRGBi( 255, 0, 255 );
board << apoint;
board.setPenColorRGBi( 255, 0, 0 );
Display2DFactory::draw(board, apoint, p2);
board.scale(10);
board.saveSVG( "pointsimpleboard.svg" );
board.saveFIG( "pointsimpleboard.fig" );
board.saveEPS( "pointsimpleboard.eps" );
board.saveTikZ( "pointsimpleboard.tikz" );
nbok++;
trace.endBlock();
return nbok == nb;
}