dgtalboard-1-points.cpp

This simple example shows the basic usage of a DGtalBoard to export graphical representations of dgtal objects (here, a HyperRectDomain and three points exported as SVG and EPS).


#include <iostream>
#include "DGtal/base/Common.h"
#include "DGtal/io/DGtalBoard.h"
#include "DGtal/helpers/StdDefs.h"

using namespace std;
using namespace DGtal;
using namespace DGtal::Z2i;


int main( int argc, char** argv )
{
  trace.beginBlock ( "Example dgtalboard-1-points" );

  Point p1( -3, -2 );
  Point p2( 7, 3 );
  Point p3( 0, 0 );
  Domain domain( p1, p2 );
  
  DGtalBoard board;
  board << domain << p1 << p2 << p3;
  board.saveSVG("dgtalboard-1-points.svg");
  board.saveEPS("dgtalboard-1-points.eps");
  
  trace.endBlock();
  return 0;
}
//                                                                           //