Board  0.9.4
examples/line_style.cpp
#include <cstdlib>
#include <iostream>
#include "Board.h"
using namespace LibBoard;
int main( int , char *[] )
{
Board board;
board.clear( Color::White );
board.setLineWidth(0.5);
int y = 10;
board.setFillColor( Color::Gray );
board.setLineStyle( Shape::DashStyle );
board.drawRectangle( 10, y, 200, 10 );
y+=20;
board.setLineStyle( Shape::DotStyle );
board.drawRectangle( 10, y, 200, 10 );
y+=20;
board.setLineStyle( Shape::DashDotStyle );
board.drawRectangle( 10, y, 200, 10 );
y+=20;
// board.setLineStyle( Shape::DashDotDotStyle );
board << Rectangle( 10, y, 200, 10, Color::Black, Color::Gray, 0.1, Shape::DashDotDotStyle );
y+=20;
board.setLineStyle( Shape::DashDotDotDotStyle );
// board.drawArrow( 10, y, 200, y );
board << Rectangle( 10, y, 200, 10, Color::Black, Color::Gray, 0.1, Shape::DashDotDotStyle );
y+=20;
board.setLineStyle( Shape::SolidStyle );
// board.drawArrow( 10, y, 200, y );
board << Rectangle( 10, y, 200, 10, Color::Black, Color::Red, 0.1, Shape::SolidStyle );
y+=20;
board.saveEPS( "line_style.eps" );
board.saveFIG( "line_style.fig" );
board.scaleToWidth(25,Board::UseLineWidth);
board.saveSVG( "line_style.svg", Board::BoundingBox, 0.0, Board::UCentimeter );
}