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-3-custom-classes.
This file is part of the DGtal library.
Definition in file dgtalBoard2D-3-custom-classes.cpp.
Definition at line 54 of file dgtalBoard2D-3-custom-classes.cpp.
55{
57
62
63 Color red( 255, 0, 0 );
64 Color dred( 192, 0, 0 );
65 Color dgreen( 0, 192, 0 );
66 Color blue( 0, 0, 255 );
67 Color dblue( 0, 0, 192 );
68
72 << p1
74 << p2
80 << p3;
81 board.
saveSVG(
"dgtalBoard2D-3-custom-classes.svg");
82 board.
saveEPS(
"dgtalBoard2D-3-custom-classes.eps");
83 board.
saveTikZ(
"dgtalBoard2D-3-custom-classes.tikz");
84
85#ifdef DGTAL_WITH_CAIRO
86 board.
saveCairo(
"dgtalBoard2D-3-custom-classes-cairo.pdf", Board2D::CairoPDF);
87 board.
saveCairo(
"dgtalBoard2D-3-custom-classes-cairo.png", Board2D::CairoPNG);
88 board.
saveCairo(
"dgtalBoard2D-3-custom-classes-cairo.ps", Board2D::CairoPS);
89 board.
saveCairo(
"dgtalBoard2D-3-custom-classes-cairo.svg", Board2D::CairoSVG);
90#endif
91
93 return 0;
94}
Aim: This class specializes a 'Board' class so as to display DGtal objects more naturally (with <<)....
Structure representing an RGB triple with alpha component.
void beginBlock(const std::string &keyword="")
void saveTikZ(const char *filename, PageSize size=Board::BoundingBox, double margin=10.0) const
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
Custom style class redefining the pen color and the fill color. You may use Board2D::Color::None for ...
Custom style class redefining the fill color. You may use Board2D::Color::None for transparent color.
Custom style class redefining the pen attributes. You may use Board2D::Color::None for transparent co...
CustomStyle(std::string classname, DrawableWithBoard2D *style)
References DGtal::Trace::beginBlock(), LibBoard::Board::CairoPDF, LibBoard::Board::CairoPNG, LibBoard::Board::CairoPS, LibBoard::Board::CairoSVG, DGtal::CustomStyle::CustomStyle(), domain, DGtal::Trace::endBlock(), main(), LibBoard::Shape::RoundCap, LibBoard::Shape::RoundJoin, LibBoard::Board::saveCairo(), LibBoard::Board::saveEPS(), LibBoard::Board::saveSVG(), LibBoard::Board::saveTikZ(), LibBoard::Shape::SolidStyle, and DGtal::trace.