]> git.lyx.org Git - features.git/blob - src/mathed/math_delim.C
first go at mathed file cleanup
[features.git] / src / mathed / math_delim.C
1  /* 
2  *  File:        math_delim.C
3  *  Purpose:     Draw delimiters and decorations
4  *  Author:      Alejandro Aguilar Sierra <asierra@servidor.unam.mx> 
5  *  Created:     January 1996
6  *  Description: Vectorial fonts for simple and resizable objets.
7  *
8  *  Dependencies: Xlib, XForms
9  *
10  *  Copyright: 1996, Alejandro Aguilar Sierra
11  *
12  *   Version: 0.8beta, Mathed & Lyx project.
13  *
14  *   You are free to use and modify this code under the terms of
15  *   the GNU General Public Licence version 2 or later.
16  */
17
18 #include <config.h>
19
20 #include FORMS_H_LOCATION
21 #include <algorithm>
22 #include <cstdlib>
23 #include "symbol_def.h"
24 #include "math_inset.h"
25 #include "LColor.h"
26 #include "Painter.h"
27 #include "math_deliminset.h"
28 #include "mathed/support.h"
29
30 using std::sort;
31 using std::lower_bound;
32 using std::endl;
33
34 /* 
35  * Internal struct of a drawing: code n x1 y1 ... xn yn, where code is:
36  * 0 = end, 1 = line, 2 = polyline, 3 = square line, 4= square polyline
37  */
38
39
40
41 //inline
42 //int odd(int x) { return ((x) & 1); }
43
44 //typedef float matriz_data[2][2];
45
46 //const matriz_data MATIDEN= { {1, 0}, {0, 1}};
47
48 //extern int mathed_char_width(short type, int style, byte c);
49 //extern int mathed_char_height(short, int, byte, int &, int &);
50
51 //#define mateq(m1, m2)  memcpy(m1, m2, sizeof(matriz_data))
52
53
54
55
56
57
58
59
60
61
62 // If we had exceptions we could return a reference in stead and not
63 // have to check for a null pointer in mathed_draw_deco
64
65