-
Notifications
You must be signed in to change notification settings - Fork 0
/
textlines.cpp
43 lines (38 loc) · 1.15 KB
/
textlines.cpp
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
32
33
34
35
36
37
38
39
40
41
42
43
#include <iostream>
#include <random>
#include <unordered_map>
#include <askiplot.hpp>
using namespace std;
using namespace askiplot;
int main() {
Plot p;
p
.SetBrush("LineVertical", DefaultBrushLineVertical) // Optional
.DrawLineVerticalAtCol(13)
.DrawLineVerticalAtCol(15)
.SetBrush("LineVertical", "!")
.DrawLineVerticalAtCol(0.5)
.SetBrush("LineHorizontal", ".")
.DrawLineHorizontalAtRow(p.GetHeight() - 2)
.DrawLineHorizontalAtRow(1)
.DrawText("North", North)
.DrawText("South", South)
.DrawText("East", East)
.DrawText("West", West)
.DrawText("NorthEast", NorthEast)
.DrawText("NorthWest", NorthWest)
.DrawText("SouthEast", SouthEast)
.DrawText("SouthWest", SouthWest)
.DrawText("Center", Center)
.DrawTextCentered("Centered text at South + Offset(0,2)", South + Offset(0,2))
.DrawTextCentered("Centered text at South", South)
.SetBrush("LineHorizontal", ">")
.DrawLineHorizontalAtRow(0.66)
.SetBrush("LineHorizontal", "<")
.DrawLineHorizontalAtRow(0.33)
.DrawTextVerticalCentered("Vertical text", East - Offset(10,0))
.DrawText("{3,3}", {3,3})
;
cout << p.Serialize();
return 0;
}