DGtal  0.6.devel
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
testArcDrawing.cpp
1 #include "DGtal/base/Common.h"
2 #include "DGtal/helpers/StdDefs.h"
3 #include "DGtal/io/boards/Board2D.h"
4 
5 
7 
8 using namespace std;
9 using namespace DGtal;
10 using namespace Z2i;
11 
12 int main(int /*argc*/, char** /*argv*/)
13 {
14 
15 
16 
18  Board2D board;
19  board.setUnit(Board2D::UCentimeter);
20  board.drawArc(0.0, 1.0, 5.0, 0, M_PI/2.0, false);
21  board.drawArc(0.0, 1.0, 4.0, 0, M_PI/2.0, true);
22  board.drawArc(0.0, 1.0, 3.0, -0.5, M_PI/2.0-0.5, false);
23  board.drawArc(0.0, 1.0, 2.0, 0.5, M_PI/2.0+0.5, false);
24  board.saveEPS( "essai.eps" );
25  board.saveSVG( "essai.svg" );
26  board.saveTikZ( "essai.tikz" );
27 #ifdef WITH_CAIRO
28  board.saveCairo("essai.pdf", Board2D::CairoPDF);
29 #endif
30 
31 
32  return 0;
33 }
34