DGtal  0.9.3
dgtalBoard2D-1-points.cpp
Go to the documentation of this file.
1 
40 #include <iostream>
42 #include "DGtal/base/Common.h"
43 #include "DGtal/io/boards/Board2D.h"
44 #include "DGtal/helpers/StdDefs.h"
46 
47 using namespace std;
48 using namespace DGtal;
49 using namespace DGtal::Z2i;
50 
52 
53 int main()
54 {
55  trace.beginBlock ( "Example dgtalBoard2D-1-points" );
56 
57  Point p1( -3, -2 );
58  Point p2( 7, 3 );
59  Point p3( 0, 0 );
60  Domain domain( p1, p2 );
61 
62  Board2D board;
63  board << domain << p1 << p2 << p3;
64 
65  board.saveSVG("dgtalBoard2D-1-points.svg");
66  board.saveEPS("dgtalBoard2D-1-points.eps");
67  board.saveTikZ("dgtalBoard2D-1-points.tikz");
68 
69 #ifdef WITH_CAIRO
70  board.saveCairo("dgtalBoard2D-1-points-cairo.pdf", Board2D::CairoPDF);
71  board.saveCairo("dgtalBoard2D-1-points-cairo.png", Board2D::CairoPNG);
72  board.saveCairo("dgtalBoard2D-1-points-cairo.ps", Board2D::CairoPS);
73  board.saveCairo("dgtalBoard2D-1-points-cairo.svg", Board2D::CairoSVG);
74 #endif
75 
76  trace.endBlock();
77  return 0;
78 }
79 // //
void beginBlock(const std::string &keyword="")
const Domain domain(Point(1, 2), Point(6, 5))
Trace trace
Definition: Common.h:137
STL namespace.
double endBlock()
void saveSVG(const char *filename, PageSize size=Board::BoundingBox, double margin=10.0) const
Definition: Board.cpp:1012
void saveCairo(const char *filename, CairoType type=CairoPNG, PageSize size=Board::BoundingBox, double margin=10.0) const
Definition: Board.cpp:1139
int main()
void saveEPS(const char *filename, PageSize size=Board::BoundingBox, double margin=10.0) const
Definition: Board.cpp:805
Z2i this namespace gathers the standard of types for 2D imagery.
DGtal is the top-level namespace which contains all DGtal functions and types.
void saveTikZ(const char *filename, PageSize size=Board::BoundingBox, double margin=10.0) const
Definition: Board.cpp:1219
Aim: This class specializes a &#39;Board&#39; class so as to display DGtal objects more naturally (with <<)...
Definition: Board2D.h:70