UNIVERS  15.3
UNIVERS base processing software API
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros
VisualParams.h
1 /* $Id: VisualParams.h,v 1.11 2004/05/13 11:28:29 vlad Exp $ */
2 
3 #ifndef __VisualParams_h
4 
5 #define __VisualParams_h
6 
7 #include <mix/Types.h>
8 #include <zm/colors.h>
9 #include <tv/VisualMode.h>
10 
11 #ifdef __cplusplus
12 extern "C" {
13 #endif /* __cplusplus */
14 
15 
16 #define LeftOffset 60
17 #define TopOffset 30
18 #define RightOffset 5
19 #define BottomOffset 5
20 
21 #define LegendHeight 19
22 
23 #define TextDescent 8
24 #define TextHalfDescent 2
25 #define TimeAxisOffset 5
26 #define DepthAxisOffset 5
27 #define ActualityOffset 5
28 
29 #define AtLeftSide (1<<0)
30 #define AtRightSide (1<<1)
31 #define AtTopSide (1<<2)
32 #define AtBottomSide (1<<3)
33 
34 
35 #define ADJUST_TOP(x,y) ((x)>(y)?(y):(x))
36 #define ADJUST_BOTTOM(x,y) ((x)<(y)?(y):(x))
37 
38 
39 typedef struct
40 {
41  /**** Trace parameters ****/
42  float Tl, Tr; /* left and right bound times {ms} */
43  unsigned long StartIndex, TrCnt; /* the first trace index and
44  count of displayed traces */
45 
46  /**** Visual parameters ****/
47  SineKind sk; /* sinus visualization type */
48  float averaging; /* persent; 'average' level of amplitude adjusting */
49  float overlapping; /* persent; how many area used by neibour traces */
50  float gapWidth; /* automatic Amplitude Level Adjustment gap width {ms} */
51  float agcDynamicAmplify; /* AGC dynamic amplify koefficient (0..1) */
52  float zeroAmplLevel;/* zero is drawn if |Acur|<Amax*zeroAmplLevel */
53  Logic colorMode; /* color amplitudes drawing (TRUE) or black&white
54  (FALSE) */
55  float fixedAmax; /* amplitude with is used as unit one for all traces */
56 } VisualParams;
57 
58 
59 typedef struct
60 {
61  char type;
62  char comp;
63  char colorname[ZCP_COLORNAME_LEN+1];
64 
66 
67 
68 typedef enum
69 {
70  AGCnorm = 0,
71  GlobalNorm,
72  LocalNorm,
73  FixedGain
74 
75 } AmplNormKind;
76 
77 typedef struct
78 {
79  float Amax; /* |A|max of this trace */
80  float Hcab; /* Cable depth of this trace */
81  float HcabAmax;/* |A|max among all traces with the same Hcab */
82 
83 } VisTraceData;
84 
85 
86 /* Dummy. Just for backward compatibility */
87 typedef enum
88 {
89  agcNormalized,
90  agcReality
91 
92 } AGCKind; /* AGC normalization type */
93 
94 
95 int GetLeftX ();
96 int GetRightX ();
97 int GetTopY ();
98 int GetBottomY ();
99 int GetWidth ();
100 int GetHeight ();
101 
102 int GetXbyTime(float time);
103 
104 int CalcInX (int x); /* window -> box */
105 int CalcInY (int y); /* window -> box */
106 int CalcOutX (int x); /* box -> window */
107 int CalcOutY (int y); /* box -> window */
108 int CalcWidth (int w);
109 int CalcHeight (int h);
110 
111 int InBox (int x, int y); /* window -> in box */
112 
113 #ifdef __cplusplus
114 };
115 #endif /* __cplusplus */
116 
117 #endif /* VisualParams.h */
Definition: VisualParams.h:77
Definition: VisualParams.h:59
Definition: VisualParams.h:39