Last change
on this file was
2,
checked in by oldcode, 23 years ago
|
Initial revision
|
-
Property svn:eol-style set to
native
-
Property svn:keywords set to
Author Date Id Revision
|
File size:
1.7 KB
|
Line | |
---|
1 | #ifndef aw_xfig_hxx_included |
---|
2 | #define aw_xfig_hxx_included |
---|
3 | |
---|
4 | /* ----------------------------------------------------------------- |
---|
5 | * Module: WINDOW/aw_xfig.hxx |
---|
6 | * |
---|
7 | * Exported Classes: xfig |
---|
8 | * |
---|
9 | * Description: xfig stuff |
---|
10 | * |
---|
11 | * ----------------------------------------------------------------- |
---|
12 | */ |
---|
13 | |
---|
14 | /* |
---|
15 | * $Header$ |
---|
16 | * |
---|
17 | * $Log$ |
---|
18 | * Revision 1.1 2000/11/23 09:41:17 westram |
---|
19 | * Initial revision |
---|
20 | * |
---|
21 | * Revision 1.6 1995/03/13 16:53:41 jakobi |
---|
22 | * *** empty log message *** |
---|
23 | * |
---|
24 | * Revision 1.5 1995/03/13 12:23:48 jakobi |
---|
25 | * *** empty log message *** |
---|
26 | * |
---|
27 | */ |
---|
28 | |
---|
29 | |
---|
30 | const int XFIG_DEFAULT_FONT_SIZE = 13; |
---|
31 | const int MAX_LINE_WIDTH = 20; |
---|
32 | const int MAX_XFIG_LENGTH = 100000; |
---|
33 | |
---|
34 | char *aw_get_font_from_xfig(int fontnr); |
---|
35 | |
---|
36 | struct AW_xfig_line { |
---|
37 | struct AW_xfig_line *next; |
---|
38 | short x0,y0; |
---|
39 | short x1,y1; |
---|
40 | short color; |
---|
41 | int gc; |
---|
42 | }; |
---|
43 | |
---|
44 | struct AW_xfig_text { |
---|
45 | struct AW_xfig_text *next; |
---|
46 | short x,y; |
---|
47 | short pix_len; |
---|
48 | char *text; |
---|
49 | AW_font font; |
---|
50 | short fontsize; |
---|
51 | int center; |
---|
52 | short color; |
---|
53 | int gc; |
---|
54 | }; |
---|
55 | |
---|
56 | struct AW_xfig_pos { |
---|
57 | short x,y; |
---|
58 | int center; |
---|
59 | }; |
---|
60 | |
---|
61 | class AW_xfig { |
---|
62 | public: |
---|
63 | struct AW_xfig_text *text; |
---|
64 | struct AW_xfig_line *line[MAX_LINE_WIDTH]; |
---|
65 | GB_HASH *hash; // hash table for buttons |
---|
66 | int minx,miny; |
---|
67 | int maxx,maxy; |
---|
68 | int size_x,size_y; |
---|
69 | int centerx,centery; |
---|
70 | |
---|
71 | double font_scale; |
---|
72 | double dpi_scale; |
---|
73 | |
---|
74 | AW_xfig(const char *filename, int fontsize); |
---|
75 | ~AW_xfig(void); |
---|
76 | void print(AW_device *device); // you can scale it |
---|
77 | void create_gcs(AW_device *device, int screen_depth); // create the gcs |
---|
78 | }; |
---|
79 | |
---|
80 | |
---|
81 | /* xfig format :: |
---|
82 | |
---|
83 | text:: |
---|
84 | |
---|
85 | 4 0 font(-1== default) fontsize depth color ?? angle justified(4=left) flags width x y text^A |
---|
86 | |
---|
87 | lines:: |
---|
88 | |
---|
89 | 2 art depth width color .... |
---|
90 | x y x y 9999 9999 |
---|
91 | |
---|
92 | */ |
---|
93 | |
---|
94 | |
---|
95 | #endif |
---|
Note: See
TracBrowser
for help on using the repository browser.