-
Notifications
You must be signed in to change notification settings - Fork 1
/
utils.h
47 lines (39 loc) · 1018 Bytes
/
utils.h
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
44
45
46
47
/*
* utils.h
* 4/4/2016
*
* CS 372 Sp16
* Group Project 2: Postscript Generator
*/
#ifndef UTILS_H_INCLUDED
#define UTILS_H_INCLUDED
#include <string>
using std::string;
using std::to_string;
#include <sstream>
using std::stringstream;
// #include <utility>
// using std::pair;
#include <cmath>
//functions that output ps code
string psBegin();
string psPageBreak();
//functions that generate ps code
string psLine(int,int);
string psMove(int,int);
string psArc(int,int,double,int,int);
string psHeader(int x, int y);
string psFooter();
//functions that calculate polygon coordinates
double calcX(int,int,double);
double calcY(int,int,double);
//functions that calculate polygon dimensions
double getWidth(int,double);
double getHeight(int,double);
double getRadius(int,double);
//functions that calculate star coordinates
double getConvexX(int k, int n, double r);
double getConvexY(int k, int n, double r);
double getConcaveX(int k, int n, double r);
double getConcaveY(int k, int n, double r);
#endif