a673bf00d61add6ece4b461ca1748ce7335e5f32
[snark14.git] / tools / Display / sd_line_t.hpp
1 /** @file sd_line_t.hpp
2     @package snark14Display
3     @author Bruno M. Carvalho and Deniz Sarioz
4     licensed under (open-source) QPL v1.0
5     which accompanies this distribution in the file QPL
6 */
7
8 /** Deniz, July 2004 -- August 2005
9     provides stuff that classes relating to each 'line' to be plotted need
10 */
11 #ifndef _SD_LINE_T
12 #define _SD_LINE_T
13
14 class QPainter;
15
16 namespace sd_line_t {
17   // number of pixels left blank as buffer outside plot area. 
18   // X is both left and right, Y is both top and bot.
19   //  MUST be natural number and not too big.
20   extern int WIDTH;
21   extern int HEIGHT;
22   extern int XWINPAD; // assume the paddings are NEVER reassigned
23   extern int YWINPAD;
24   extern int YAXISNOTCHLABELOFFSET;
25   extern int YAXISLABELOFFSET;
26   extern double Y_HALF_FUDGE_FACTOR;
27   extern int X_HALF_FUDGE_INCREMENT;
28   extern void drawBoundary(QPainter& P);  // boundary JUST OUTSIDE the actual paint area
29   extern void drawBigPoint(QPainter& P, int cx, int cy); // defined in sd_line_t.cpp
30 } // -- namespace sd_line_t
31
32 // logically, the following structs/classes should be defined
33 // within namespace sd_line_t as well, but it would be rather clunky 
34 //   and enough abstraction is already provided.
35
36 //typedef 
37 struct point_real_t{
38   int x;
39   double y;
40 } ;
41
42
43 /* single pixel coord in the window */
44 //typedef 
45 struct point_window_t{
46   int x;
47   int y;
48 } ;
49
50 #endif