-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathshowPost.cpp
More file actions
37 lines (33 loc) · 769 Bytes
/
showPost.cpp
File metadata and controls
37 lines (33 loc) · 769 Bytes
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
#include <string>
#include <vector>
#include <cmath>
#include <iostream>
using std::cout;
using std::cos;
using std::sin;
#include "Shape.hpp"
void start();
void end();
int main()
{
auto mycir = makeCircle(2.0);
auto mySquare = makeSquare(2.0);
auto mypoly = makePolygon(5, 1);
auto myRec = makeRectangle(2.0, 5.0);
auto myTri = makeTriangle(3.0);
auto mySpace = makeSpacer(2.0, 3.0);
auto myScale = makeScaledShape(mypoly, 2, 2);
auto myLayered = makeVerticalShape({mycir, myScale, mySquare, mypoly, myRec, myTri, mySpace});
start();
myLayered->generatePostScript(cout);
end();
return 0;
}
void start(){
cout << "%! \n288 288 translate\n";
return;
}
void end(){
cout << "\nshowpage \n\n\n";
return;
}