DGtal 1.4.0
Loading...
Searching...
No Matches
testArcDrawing.cpp
1#include "DGtal/base/Common.h"
2#include "DGtal/helpers/StdDefs.h"
3#include "DGtal/io/boards/Board2D.h"
4
5
7
8using namespace std;
9using namespace DGtal;
10using namespace Z2i;
11
12int 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
31
32 return 0;
33}
34
Aim: This class specializes a 'Board' class so as to display DGtal objects more naturally (with <<)....
Definition Board2D.h:71
void saveTikZ(const char *filename, PageSize size=Board::BoundingBox, double margin=10.0) const
Definition Board.cpp:1218
void drawArc(double x, double y, double radius, double angle1, double angle2, bool neg, int depthValue=-1)
Definition Board.cpp:460
void saveEPS(const char *filename, PageSize size=Board::BoundingBox, double margin=10.0) const
Definition Board.cpp:804
void saveSVG(const char *filename, PageSize size=Board::BoundingBox, double margin=10.0) const
Definition Board.cpp:1011
void setUnit(Unit unit)
Definition Board.cpp:239
void saveCairo(const char *filename, CairoType type=CairoPNG, PageSize size=Board::BoundingBox, double margin=10.0) const
Definition Board.cpp:1138
DGtal is the top-level namespace which contains all DGtal functions and types.
STL namespace.
int main()
Definition testBits.cpp:56