File: rend.h

package info (click to toggle)
qepcad 1.74%2Bds-5
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 4,848 kB
  • sloc: ansic: 27,242; cpp: 2,995; makefile: 1,287; perl: 91
file content (88 lines) | stat: -rw-r--r-- 2,891 bytes parent folder | download | duplicates (2)
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
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
/*************************************************************
 **
 **  rend.h
 **
 **
 *************************************************************/
#ifndef _REND_
#define _REND_


class Rend_Cell;
class Rend_Sample;
class Rend_Win;

/*************************************************************
 **  Includes
 *************************************************************/
extern "C" {
#include <stdio.h>
};

/* adj2D needs to enclose adj2D.h in extern C, if qepcad is not all C++! */
//extern "C" {
#include <stdio.h>
#include "adj2D.h"
//};

#include <fstream>
#include "Safe_Array.h"
#include "gcmemloc.h"
#include "Rend_Sample.h"
#include "Rend_Cell.h"
#include "Rend_Win.h"

#include <iostream>
#include <sstream>
istream& qein() __pure; // fetches the current qepcad istream object

class singlelinestream : public istringstream
{
public:
  enum option {none = 0, skipleadingws = 1};
  singlelinestream(istream& in, option opt = none)
  {
    string s = "";
    signed char c = in.get(); if (opt == skipleadingws) while(c != EOF && isspace(c)) c = in.get();
    while(c != '\n' && c != EOF) { s += c; c = in.get(); }
    str(s);
  }
};

/*************************************************************
 **  Function Prototypes
 *************************************************************/
Word LBRNQORD(Word A,Word B);
Word SSILRCRI(Word a_,Word b_);

void CONMIRCAD(Word D,Word P,Word J,Rend_Cell& M,QepcadCls &Q);
void ADD_POINTS( Rend_Cell &C, Word p_index, Word x, Word L_);
void FILL_2D( Rend_Cell &M, Rend_Win &W, Word e, Word L, Word P );
void WRITE_PLOT(Rend_Cell &M, Rend_Win &W, Word l, Word r, ostream &out);
Word ZOOM_OUT(Rend_Cell &M, Rend_Win &W, Word xf,
	      Word yf, Word N, Word P);
Word CH_VIEW_WIN(Rend_Cell &M, Rend_Win &W, Word Xs, Word Xt,
	      Word Ys,Word Yt, Word e, Word P);
Word CH_VIEW_WIN_COOR(Rend_Cell &M, Rend_Win &W, Word P, Word N,
		 Word x,Word X, Word y, Word Y);
void WRITE_PS(Rend_Cell &M, Rend_Win &W, Word L, Word e, Word P);
void WRITE_PS_COLOR(Rend_Cell &M, Rend_Win &W, Word L, Word e, Word P);
void WRITE_PS_STANDARD(Rend_Cell &M, Rend_Win &W, Word L, Word e, Word P, Word Oflag = 0);
void WRITE_PS_RAJI(Rend_Cell &M, Rend_Win &W, Word L, Word e, Word P, Word Oflag = 1);
void WRITE_PS_INTERACTIVE(Rend_Cell &M, Rend_Win &W, Word L, Word e, Word D, Word P);
void WRITE_EPS(Rend_Cell &M, Rend_Win &W, Word L, Word e, Word P,ostream& out, bool c, bool z);

void PLOT_2D_CAD(Word D, Word P, Word J, 
		 Word Ix, Word IX, Word Iy, Word IY, Word e,
		 Word Id1, Word Id2, QepcadCls &QC);

void PLOTeps_2D_CAD(Word D, Word P, Word J, 
		    Word Ix, Word IX, Word Iy, Word IY, Word e, 
		    ostream &out, char cflag, char zdcell, QepcadCls &QC
);

void EPS_HEADER(double x1, double y1, double x2, double y2, double offset, ostream& out, double D = 0);

static inline int min(int a, int b) { return a < b ? a : b; }

#endif /* _REND_ */