DGtal  1.0.0
Functions
dgtalBoard2D-1-points.cpp File Reference
#include <iostream>
#include "DGtal/base/Common.h"
#include "DGtal/io/boards/Board2D.h"
#include "DGtal/helpers/StdDefs.h"
Include dependency graph for dgtalBoard2D-1-points.cpp:

Go to the source code of this file.

Functions

int main ()
 

Detailed Description

This program is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

You should have received a copy of the GNU General Public License along with this program. If not, see http://www.gnu.org/licenses/.

Author
Jacques-Olivier Lachaud (jacqu.nosp@m.es-o.nosp@m.livie.nosp@m.r.la.nosp@m.chaud.nosp@m.@uni.nosp@m.v-sav.nosp@m.oie..nosp@m.fr ) Laboratory of Mathematics (CNRS, UMR 5807), University of Savoie, France
Date
2010/11/26

An example file named dgtalBoard2D-1-points.

Definition in file dgtalBoard2D-1-points.cpp.

Function Documentation

◆ main()

int main ( )

Definition at line 53 of file dgtalBoard2D-1-points.cpp.

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 }
void beginBlock(const std::string &keyword="")
Trace trace
Definition: Common.h:144
double endBlock()
Domain domain
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
void saveEPS(const char *filename, PageSize size=Board::BoundingBox, double margin=10.0) const
Definition: Board.cpp:805
void saveTikZ(const char *filename, PageSize size=Board::BoundingBox, double margin=10.0) const
Definition: Board.cpp:1219
Aim: This class specializes a 'Board' class so as to display DGtal objects more naturally (with <<)....
Definition: Board2D.h:70

References DGtal::Trace::beginBlock(), domain, DGtal::Trace::endBlock(), LibBoard::Board::saveCairo(), LibBoard::Board::saveEPS(), LibBoard::Board::saveSVG(), LibBoard::Board::saveTikZ(), and DGtal::trace.