32#include "DGtal/base/Common.h"
33#include "ConfigTest.h"
34#include "DGtal/helpers/StdDefs.h"
35#include "DGtal/io/colormaps/TickedColorMap.h"
36#include "DGtal/io/colormaps/HueShadeColorMap.h"
37#include "DGtal/io/colormaps/GradientColorMap.h"
38#include "DGtal/io/boards/Board2D.h"
53 unsigned int nbok = 0;
65 Color c = ticked(4.5);
68 trace.
info() <<
"(" << nbok <<
"/" << nb <<
") "
69 <<
"c == white on tick inf.."<< std::endl;
74 trace.
info() <<
"(" << nbok <<
"/" << nb <<
") "
75 <<
"c == white on tick sup.."<< std::endl;
80 trace.
info() <<
"(" << nbok <<
"/" << nb <<
") "
81 <<
"c == white on tick sup.. "<< std::endl;
86 trace.
info() <<
"(" << nbok <<
"/" << nb <<
") "
87 <<
"c == white on tick sup.. "<< std::endl;
93 trace.
info() <<
"(" << nbok <<
"/" << nb <<
") "
94 <<
"c != white outside.. "<< std::endl;
111 for(
unsigned int i=0; i < 100; i++)
114 board.
saveEPS(
"testTicked.eps");
120 for(
unsigned int i=0; i < 100; i++)
123 board.
saveEPS(
"testTicked-regular.eps");
132 for(
unsigned int i=0; i < 100; i++)
135 board.
saveEPS(
"testTicked-gradient-regular.eps");
143int main(
int argc,
char** argv )
147 for (
int i = 0; i < argc; ++i )
152 trace.
emphase() << ( res ?
"Passed." :
"Error." ) << endl;
Aim: This class specializes a 'Board' class so as to display DGtal objects more naturally (with <<)....
Structure representing an RGB triple with alpha component.
Aim: This class adapts any colormap to add "ticks" in the colormap colors.
void addTick(const Value position, const Value thickness)
void addRegularTicks(const unsigned int nbTicks, const Value thickness)
ColorMap * colormap() const
void beginBlock(const std::string &keyword="")
void clear(const DGtal::Color &color=DGtal::Color::None)
void saveEPS(const char *filename, PageSize size=Board::BoundingBox, double margin=10.0) const
DGtal is the top-level namespace which contains all DGtal functions and types.
Custom style class redefining the pen color and the fill color. You may use Board2D::Color::None for ...
bool testTickedColorMap()