Board  0.9.2
examples/example3.cpp
#include <cstdlib>
#include <iostream>
#include <fstream>
#include <cmath>
#include "Board.h"
using namespace LibBoard;
int main( int, char *[] )
{
Board board;
board.clear( Color(0,120,0) );
board.setPenColorRGBi( 255, 0, 0 );
board.fillGouraudTriangle( -50, 100, Color( 255, 0, 0 ),
0, 100, Color( 0, 255, 0 ),
-30, 130, Color( 0, 120, 255 ) );
board.saveEPS( "draw3.eps", 210, 297 );
board.saveEPS( "draw3_15x10.eps", 210, 297, 25 );
board.saveFIG( "draw3.fig" );
board.saveFIG( "draw3_A4.fig", Board::A4 );
board.saveSVG( "draw3.svg" ); // Viewport == BoundingBox
board.saveSVG( "draw3_A4.svg", Board::A4, 50 ); // Centered on an A4 paper,
// with a 50mm margin.
board.scale(10); // Scaled 10 times
board.saveSVG( "draw3_x10.svg" ); // Saved with
// Viewport == BoundingBox
exit(0);
}