Test for 0022778: Bug in BRepMesh
[occt.git] / src / CGM / cgmstruc.h
CommitLineData
b311480e 1/*
2 Copyright (c) 1999-2012 OPEN CASCADE SAS
3
4 The content of this file is subject to the Open CASCADE Technology Public
5 License Version 6.5 (the "License"). You may not use the content of this file
6 except in compliance with the License. Please obtain a copy of the License
7 at http://www.opencascade.org and read it completely before using this file.
8
9 The Initial Developer of the Original Code is Open CASCADE S.A.S., having its
10 main offices at: 1, place des Freres Montgolfier, 78280 Guyancourt, France.
11
12 The Original Code and all software distributed under the License is
13 distributed on an "AS IS" basis, without warranty of any kind, and the
14 Initial Developer hereby disclaims all such warranties, including without
15 limitation, any warranties of merchantability, fitness for a particular
16 purpose or non-infringement. Please see the License for the specific terms
17 and conditions governing the rights and limitations under the License.
18
19*/
20
7fd59977 21#ifndef CGMSTRUCT_H
22#define CGMSTRUCT_H
23
24/* Include all files on which this is dependent. */
25
26#include "cgmtypes.h"
27#include "cgmelem.h"
28#include "cgmpar.h"
29
30/* Define real precision structure (character encoding) */
31
32struct real_prec {
33 Prec prec, min, defexp, expald;
34};
35
36/* CGM element codes for clear text input and output */
37
38struct commands {
39 Code code;
40 char *string;
41 };
42
43/* Encoding Specific defaults */
44
45struct char_defaults{
46 Prec int_prec, index_prec, vdcint_prec;
47 struct real_prec real, vdc;
48 Prec col_prec, colind_prec;
49 struct colour min_rgb, max_rgb;
50 long ring_angres, ring_int, ring_real;
51};
52
53struct text_defaults{
54 long min_int, max_int, min_index, max_index;
55 float min_real, max_real;
56 Prec real_digits;
57 struct vdc min_vdc, max_vdc;
58 Prec vdc_digits, colind_prec, col_prec;
59 struct colour min_rgb, max_rgb;
60};
61
62struct bin_defaults{
63 Prec int_prec, index_prec, vdcint_prec;
64 Enum real_type, vdc_type;
65 Prec real_whole, real_fraction, vdc_whole, vdc_fraction;
66 Prec col_prec, colind_prec;
67 struct colour min_rgb, max_rgb;
68};
69
70struct defaults {
71
72/* Encoding independent defaults */
73
74 Index max_colind;
75 Enum vdc_type, transparency, clip_ind;
76 Enum color_mode, scale_mode;
77 float scale_factor;
78 Enum linewidth_mode, markersize_mode, edgewidth_mode;
79 struct colour back, aux;
80 struct rect vdc_extent, clip_rect;
81
82/* Retain encoding defaults for common access */
83
84 Prec int_bits, /* integer prec in bits */
85 index_bits, /* index prec in bits */
86 vdcint_bits, /* vdc integer precision in bits */
87 real_bits, /* real prec in bits */
88 real_places, /* binary bits after decimal place */
89 vdc_bits, /* vdc prec in bits */
90 vdc_places, /* binary bits after decimal place */
91 col_bits, /* colour prec in bits */
92 colind_bits; /* colour index prec in bits */
93 float min_real, /* min real value */
94 max_real, /* max real value */
95 realmin, /* smallest real value */
96 min_vdc, /* min real vdc value */
97 max_vdc, /* max real vdc value */
98 vdcmin; /* smallest vdc real value */
99 Prec real_defexp, /* Real default exponent */
100 real_expald, /* Real exponenet allowed */
101 vdc_defexp, /* VDC default exponent */
102 vdc_expald; /* VDC exponenet allowed */
103 struct colour min_rgb, /* integer values: index/RGB */
104 max_rgb; /* integer values: index/RGB */
105 Logical colprec_flag, /* Flag to show if colour precision set */
106 colval_flag; /* Flag to show if colour value extent set */
107 };
108
109/* Graphics attributes */
110
111struct attributes {
112 Index line_ind, mark_ind, text_ind, fill_ind, edge_ind;
113 Index line_type, mark_type, text_font, edge_type;
114 struct vdc line_width, mark_size, edge_width;
115 struct colour line, marker, text, fill, edge;
116 Enum text_prec, text_path, text_halign, text_valign, edge_vis;
117 float text_hcont, text_vcont;
118 Index char_set, altchar_set;
119 float char_exp, char_space;
120 struct point char_up, char_base;
121 struct vdc char_height;
122 Enum int_style;
123 Index hatch_ind, pat_ind;
124 struct point fill_ref;
125 struct rect pat_size;
126 Enum asf[ASFS];
127/* Flags for VDC dependent defaults */
128 Logical linewidth_flag, markersize_flag, edgewidth_flag,
129 charheight_flag, cliprect_flag;
130 };
131
132
133/* Structure for attribute change flags */
134
135struct flags {
136 Logical line_index, line_type, line_width, line_color;
137 Logical mark_index, mark_type, mark_size, mark_color;
138 Logical text_index, text_font, text_prec, char_expan, char_space,
139 text_color, char_height, char_orient, char_set,
140 altchar_set, text_path, text_align;
141 Logical fill_index, int_style, hatch_ind,
142 pat_ind, pat_size, fill_color, fill_ref;
143 Logical edge_index, edge_type, edge_width, edge_color, edge_vis;
144};
145
146/* structure for random frame searching */
147
148 struct data_frame
149 {
150 fpos_t disk_addr;
151 char *cur_ptr, *end_ptr;
152 union {
153 int meta;
154 int frame;
155 } index;
156 };
157
158 /* Basic data held about CGM character sets and CGM fonts, as
159 provided in CGM CHARACTERSETLIST and FONTLIST elements.
160 */
161
162struct cgmfont
163
164 { char **names;
165 int count;
166 };
167
168struct cgmcset
169
170 { char **names;
171 int *types;
172 int count;
173 };
174
175#endif /* end of cgmstruc.h */