DGtal
2.2.0
Toggle main menu visibility
Loading...
Searching...
No Matches
io/boards/logoDGtal.cpp
Simple example to generate
DGtal
logo in
DGtal
.
visualization of resulting export.
#include <iostream>
#include "DGtal/base/Common.h"
#include "DGtal/io/boards/Board2D.h"
#include "DGtal/helpers/StdDefs.h"
using namespace
std
;
using namespace
DGtal
;
using namespace
DGtal::Z2i
;
int
main
()
{
trace
.
beginBlock
(
"Generate DGtal logo (without drop shadow)"
);
Point
p1( 0,0 );
Point
p2( 26, 8 );
Domain
domain
( p1, p2 );
Board2D
board;
board <<
SetMode
(
domain
.className(),
"Paving"
) <<
domain
;
board <<
CustomStyle
( p1.className(),
new
CustomPen
(
Color
(0,0,0),
Color
(180,180,180), 2.5,
Board2D::Shape::SolidStyle
,
Board2D::Shape::RoundCap
,
Board2D::Shape::RoundJoin
))
<<
Point
(1,1) <<
Point
(1,2) <<
Point
(1,3)
<<
Point
(1,4) <<
Point
(1,5) <<
Point
(1,6)
<<
Point
(1,7) <<
Point
(2,1) <<
Point
(3,1) <<
Point
(4,1)
<<
Point
(4,2) <<
Point
(5,2) <<
Point
(5,3)
<<
Point
(5,4) <<
Point
(5,5) <<
Point
(5,6)
<<
Point
(4,6) <<
Point
(4,7) <<
Point
(3,7)
<<
Point
(2,7) <<
Point
(9,1) <<
Point
(9,2)
<<
Point
(8,2) <<
Point
(8,3)
<<
Point
(8,4) <<
Point
(8,5) <<
Point
(8,6)
<<
Point
(9,6) <<
Point
(9,7) <<
Point
(10,7)
<<
Point
(11,7) <<
Point
(10,1) <<
Point
(11,1) <<
Point
(12,1)
<<
Point
(12,2) <<
Point
(12,3) <<
Point
(12,4) <<
Point
(11,4);
board <<
CustomStyle
( p1.className(),
new
CustomPen
(
Color
(0,0,0),
Color
(0,0,0), 1.0,
Board2D::Shape::SolidStyle
,
Board2D::Shape::RoundCap
,
Board2D::Shape::RoundJoin
))
<<
Point
(15,1) <<
Point
(16,1) <<
Point
(17,1)
<<
Point
(15,2) <<
Point
(15,3) <<
Point
(15,4)
<<
Point
(15,5) <<
Point
(16,4)
<<
Point
(19,1) <<
Point
(21,1) <<
Point
(20,1) <<
Point
(22,1)
<<
Point
(19,2) <<
Point
(21,2)
<<
Point
(19,3) <<
Point
(20,3) <<
Point
(21,3)
<<
Point
(24,1) <<
Point
(25,1)
<<
Point
(24,2) <<
Point
(24,3) <<
Point
(24,4) <<
Point
(24,5);
board.
saveSVG
(
"logoDGtal.svg"
);
trace
.
endBlock
();
return
0;
}
// //
DGtal::Board2D
Aim: This class specializes a 'Board' class so as to display DGtal objects more naturally (with <<)....
Definition
Board2D.h:71
DGtal::Color
Structure representing an RGB triple with alpha component.
Definition
Color.h:77
DGtal::Trace::beginBlock
void beginBlock(const std::string &keyword="")
DGtal::Trace::endBlock
double endBlock()
LibBoard::Board::saveSVG
void saveSVG(const char *filename, PageSize size=Board::BoundingBox, double margin=10.0) const
Definition
Board.cpp:1011
DGtal::Z2i
Z2i this namespace gathers the standard of types for 2D imagery.
DGtal
DGtal is the top-level namespace which contains all DGtal functions and types.
Definition
ClosedIntegerHalfPlane.h:49
DGtal::trace
Trace trace
std
STL namespace.
DGtal::CustomPen
Custom style class redefining the pen attributes. You may use Board2D::Color::None for transparent co...
Definition
Board2D.h:374
DGtal::CustomStyle
Definition
Board2D.h:217
DGtal::SetMode
Modifier class in a Board2D stream. Useful to choose your own mode for a given class....
Definition
Board2D.h:247
LibBoard::Shape::RoundJoin
@ RoundJoin
Definition
Board/Shapes.h:61
LibBoard::Shape::SolidStyle
@ SolidStyle
Definition
Board/Shapes.h:62
LibBoard::Shape::RoundCap
@ RoundCap
Definition
Board/Shapes.h:60
Point
MyPointD Point
Definition
testClone2.cpp:381
main
int main(int, char **)
Definition
testIntegerComputer.cpp:331
domain
Domain domain
Definition
testProjection.cpp:88
Domain
HyperRectDomain< Space > Domain
Definition
testSimpleRandomAccessRangeFromPoint.cpp:44
Generated on
for DGtal by
1.18.0