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 dgtalboard-2-sets.
This file is part of the DGtal library.
Definition in file dgtalBoard2D-2-sets.cpp.
Definition at line 59 of file dgtalBoard2D-2-sets.cpp.
60{
62
69 shape_set.erase(
Point( -5, -1 ) );
70 shape_set.erase(
Point( 5, 1 ) );
71
73 board <<
domain << shape_set;
74 board.
saveSVG(
"dgtalBoard2D-2-sets-1.svg");
75 board.
saveEPS(
"dgtalBoard2D-2-sets-1.eps");
76 board.
saveTikZ(
"dgtalBoard2D-2-sets-1.tikz");
77
78#ifdef WITH_CAIRO
79 board.
saveCairo(
"dgtalBoard2D-2-sets-1-cairo.pdf", Board2D::CairoPDF);
80 board.
saveCairo(
"dgtalBoard2D-2-sets-1-cairo.png", Board2D::CairoPNG);
81 board.
saveCairo(
"dgtalBoard2D-2-sets-1-cairo.ps", Board2D::CairoPS);
82 board.
saveCairo(
"dgtalBoard2D-2-sets-1-cairo.svg", Board2D::CairoSVG);
83#endif
84
86
87
90 <<
SetMode( shape.className(),
"DrawAdjacencies" )
91 << shape;
92 board.
saveSVG(
"dgtalBoard2D-2-sets-2.svg");
93 board.
saveEPS(
"dgtalBoard2D-2-sets-2.eps");
94 board.
saveTikZ(
"dgtalBoard2D-2-sets-2.tikz");
95
96#ifdef WITH_CAIRO
97 board.
saveCairo(
"dgtalBoard2D-2-sets-2-cairo.pdf", Board2D::CairoPDF);
98 board.
saveCairo(
"dgtalBoard2D-2-sets-2-cairo.png", Board2D::CairoPNG);
99 board.
saveCairo(
"dgtalBoard2D-2-sets-2-cairo.ps", Board2D::CairoPS);
100 board.
saveCairo(
"dgtalBoard2D-2-sets-2-cairo.svg", Board2D::CairoSVG);
101#endif
102
104
105
108 <<
SetMode( shape2.className(),
"DrawAdjacencies" )
109 << shape2;
110 board.
saveSVG(
"dgtalBoard2D-2-sets-3.svg");
111 board.
saveEPS(
"dgtalBoard2D-2-sets-3.eps");
112 board.
saveTikZ(
"dgtalBoard2D-2-sets-3.tikz");
113
114#ifdef WITH_CAIRO
115 board.
saveCairo(
"dgtalBoard2D-2-sets-3-cairo.pdf", Board2D::CairoPDF);
116 board.
saveCairo(
"dgtalBoard2D-2-sets-3-cairo.png", Board2D::CairoPNG);
117 board.
saveCairo(
"dgtalBoard2D-2-sets-3-cairo.ps", Board2D::CairoPS);
118 board.
saveCairo(
"dgtalBoard2D-2-sets-3-cairo.svg", Board2D::CairoSVG);
119#endif
120
122 return 0;
123}
Aim: This class specializes a 'Board' class so as to display DGtal objects more naturally (with <<)....
Aim: A wrapper class around a STL associative container for storing sets of digital points within som...
Aim: An object (or digital object) represents a set in some digital space associated with a digital t...
static void addNorm1Ball(TDigitalSet &aSet, const Point &aCenter, UnsignedInteger aRadius)
void beginBlock(const std::string &keyword="")
void saveTikZ(const char *filename, PageSize size=Board::BoundingBox, double margin=10.0) const
void clear(const DGtal::Color &color=DGtal::Color::None)
void saveEPS(const char *filename, PageSize size=Board::BoundingBox, double margin=10.0) const
void saveSVG(const char *filename, PageSize size=Board::BoundingBox, double margin=10.0) const
void saveCairo(const char *filename, CairoType type=CairoPNG, PageSize size=Board::BoundingBox, double margin=10.0) const
Modifier class in a Board2D stream. Useful to choose your own mode for a given class....
References DGtal::Shapes< TDomain >::addNorm1Ball(), DGtal::Trace::beginBlock(), DGtal::Object< TDigitalTopology, TDigitalSet >::className(), LibBoard::Board::clear(), domain, DGtal::Z2i::dt4_8, DGtal::Z2i::dt8_4, DGtal::Trace::endBlock(), DGtal::DigitalSetByAssociativeContainer< TDomain, TContainer >::erase(), LibBoard::Board::saveCairo(), LibBoard::Board::saveEPS(), LibBoard::Board::saveSVG(), LibBoard::Board::saveTikZ(), and DGtal::trace.