A simple example of cellular grid space with several cells instantiated and visualized. This program outputs this image.
- See also
- Creating (unsigned) cells in a cellular grid space
#include <iostream>
#include "DGtal/base/Common.h"
#include "DGtal/helpers/StdDefs.h"
#include "DGtal/io/boards/Board2D.h"
#include "DGtal/io/Color.h"
{
K.init( plow, pup,
true );
Cell pixlow =
K.uSpel( plow );
Cell ptlow =
K.uPointel( plow );
Cell pixup =
K.uSpel( pup );
Cell ptup1 =
K.uPointel( pup );
Cell ptup2 =
K.uTranslation( ptup1, Point::diagonal() );
Color( 100, 100, 255 ) ) )
<< ptlow << ptup2;
Color( 255, 100, 100 ) ) )
<< pixlow << pixup;
Color( 100, 255, 100 ) ) )
<< linelb << linelt << linell << linelr;
return 0;
}
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 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
Z2i this namespace gathers the standard of types for 2D imagery.
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 ...
std::string className() const
Return the style name used for drawing this object.
Modifier class in a Board2D stream. Useful to choose your own mode for a given class....
HyperRectDomain< Space > Domain