forked from c-koi/libboard
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathcircled_framed.cpp
More file actions
31 lines (30 loc) · 1.3 KB
/
circled_framed.cpp
File metadata and controls
31 lines (30 loc) · 1.3 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
/**
* @file circled_framed.cpp
* @author Sebastien Fourey (GREYC)
*
* @brief Sample drawing using the board library.
*
* This source code is part of the Board project, a C++ library whose
* purpose is to allow simple drawings in EPS, FIG or SVG files.
* Copyright (C) 2007 Sebastien Fourey <https://fourey.users.greyc.fr>
*/
#include <Board.h>
#include <cstdlib>
#include <iostream>
using namespace LibBoard;
int main(int, char *[])
{
Board board;
const double TEXT_SIZE = 6.0;
Style::setDefaultLineWidth(0.5);
const double TEXT_LINEWIDTH = 0.33 * Style::defaultLineWidth();
board << circled(boardFontText(Point(), "Hello World!", TEXT_SIZE, Color::Black, TEXT_LINEWIDTH), 2.0);
board << tiling(circled(boardFontText(Point(), "C", TEXT_SIZE, Color::Black, TEXT_LINEWIDTH), //
2.0, Color::Red, Color("#5effa9")), //
board.bbox(UseLineWidth).topRight(), //
5, 5, 2);
board << tiling(framed(boardFontText(Point(), "R", TEXT_SIZE, Color::Black, TEXT_LINEWIDTH), //
2.0, Color::Red, Color("#5effa9")), //
board.bbox(UseLineWidth).topRight(), 5, 5, 2);
board.saveSVG("circled_framed.svg");
}