libDXF 0.0.1
A library with DXF related functions written in C.
|
00001 00042 #include "global.h" 00043 #include "point.h" 00044 #include "binary_graphics_data.h" 00045 00046 00047 #ifndef LIBDXF_SRC_ATTDEF_H 00048 #define LIBDXF_SRC_ATTDEF_H 00049 00050 00051 #ifdef __cplusplus 00052 extern "C" { 00053 #endif 00054 00055 00060 typedef struct 00061 dxf_attdef_struct 00062 { 00063 /* Members common for all DXF drawable entities. */ 00064 int id_code; 00069 char *linetype; 00073 char *layer; 00077 double elevation; 00082 double thickness; 00086 double linetype_scale; 00089 int16_t visibility; 00097 int color; 00104 int paperspace; 00110 int graphics_data_size; 00119 int16_t shadow_mode; 00129 DxfBinaryGraphicsData *binary_graphics_data; 00135 char *dictionary_owner_soft; 00139 char *material; 00144 char *dictionary_owner_hard; 00148 int16_t lineweight; 00153 char *plot_style_name; 00157 long color_value; 00169 char *color_name; 00177 long transparency; 00185 /* Specific members for a DXF attdef. */ 00186 char *default_value; 00189 char *tag_value; 00192 char *prompt_value; 00196 char *text_style; 00201 DxfPoint *p0; 00204 DxfPoint *p1; 00208 double height; 00211 double rel_x_scale; 00215 double rot_angle; 00219 double obl_angle; 00223 int attr_flags; 00234 int text_flags; 00243 int hor_align; 00257 int field_length; 00261 int vert_align; 00274 double extr_x0; 00278 double extr_y0; 00282 double extr_z0; 00286 struct DxfAttdef *next; 00289 } DxfAttdef; 00290 00291 00292 DxfAttdef *dxf_attdef_new (); 00293 DxfAttdef *dxf_attdef_init (DxfAttdef *attdef); 00294 DxfAttdef *dxf_attdef_read (DxfFile *fp, DxfAttdef *attdef); 00295 int dxf_attdef_write (DxfFile *fp, DxfAttdef *attdef); 00296 int dxf_attdef_free (DxfAttdef *attdef); 00297 void dxf_attdef_free_chain (DxfAttdef *attdefs); 00298 int dxf_attdef_get_id_code (DxfAttdef *attdef); 00299 DxfAttdef *dxf_attdef_set_id_code (DxfAttdef *attdef, int id_code); 00300 char *dxf_attdef_get_linetype (DxfAttdef *attdef); 00301 DxfAttdef *dxf_attdef_set_linetype (DxfAttdef *attdef, char *linetype); 00302 char *dxf_attdef_get_layer (DxfAttdef *attdef); 00303 DxfAttdef *dxf_attdef_set_layer (DxfAttdef *attdef, char *layer); 00304 double dxf_attdef_get_elevation (DxfAttdef *attdef); 00305 DxfAttdef *dxf_attdef_set_elevation (DxfAttdef *attdef, double elevation); 00306 double dxf_attdef_get_thickness (DxfAttdef *attdef); 00307 DxfAttdef *dxf_attdef_set_thickness (DxfAttdef *attdef, double thickness); 00308 double dxf_attdef_get_linetype_scale (DxfAttdef *attdef); 00309 DxfAttdef *dxf_attdef_set_linetype_scale (DxfAttdef *attdef, double linetype_scale); 00310 int16_t dxf_attdef_get_visibility (DxfAttdef *attdef); 00311 DxfAttdef *dxf_attdef_set_visibility (DxfAttdef *attdef, int16_t visibility); 00312 int dxf_attdef_get_color (DxfAttdef *attdef); 00313 DxfAttdef *dxf_attdef_set_color (DxfAttdef *attdef, int color); 00314 int dxf_attdef_get_paperspace (DxfAttdef *attdef); 00315 DxfAttdef *dxf_attdef_set_paperspace (DxfAttdef *attdef, int paperspace); 00316 int dxf_attdef_get_graphics_data_size (DxfAttdef *attdef); 00317 DxfAttdef *dxf_attdef_set_graphics_data_size (DxfAttdef *attdef, int graphics_data_size); 00318 int16_t dxf_attdef_get_shadow_mode (DxfAttdef *attdef); 00319 DxfAttdef *dxf_attdef_set_shadow_mode (DxfAttdef *attdef, int16_t shadow_mode); 00320 DxfBinaryGraphicsData *dxf_attdef_get_binary_graphics_data (DxfAttdef *attdef); 00321 DxfAttdef *dxf_attdef_set_binary_graphics_data (DxfAttdef *attdef, DxfBinaryGraphicsData *data); 00322 char *dxf_attdef_get_dictionary_owner_soft (DxfAttdef *attdef); 00323 DxfAttdef *dxf_attdef_set_dictionary_owner_soft (DxfAttdef *attdef, char *dictionary_owner_soft); 00324 char *dxf_attdef_get_material (DxfAttdef *attdef); 00325 DxfAttdef *dxf_attdef_set_material (DxfAttdef *attdef, char *material); 00326 char *dxf_attdef_get_dictionary_owner_hard (DxfAttdef *attdef); 00327 DxfAttdef *dxf_attdef_set_dictionary_owner_hard (DxfAttdef *attdef, char *dictionary_owner_hard); 00328 int16_t dxf_attdef_get_lineweight (DxfAttdef *attdef); 00329 DxfAttdef *dxf_attdef_set_lineweight (DxfAttdef *attdef, int16_t lineweight); 00330 char *dxf_attdef_get_plot_style_name (DxfAttdef *attdef); 00331 DxfAttdef *dxf_attdef_set_plot_style_name (DxfAttdef *attdef, char *plot_style_name); 00332 long dxf_attdef_get_color_value (DxfAttdef *attdef); 00333 DxfAttdef *dxf_attdef_set_color_value (DxfAttdef *attdef, long color_value); 00334 char *dxf_attdef_get_color_name (DxfAttdef *attdef); 00335 DxfAttdef *dxf_attdef_set_color_name (DxfAttdef *attdef, char *color_name); 00336 long dxf_attdef_get_transparency (DxfAttdef *attdef); 00337 DxfAttdef *dxf_attdef_set_transparency (DxfAttdef *attdef, long transparency); 00338 char *dxf_attdef_get_default_value (DxfAttdef *attdef); 00339 DxfAttdef *dxf_attdef_set_default_value (DxfAttdef *attdef, char *default_value); 00340 char *dxf_attdef_get_tag_value (DxfAttdef *attdef); 00341 DxfAttdef *dxf_attdef_set_tag_value (DxfAttdef *attdef, char *tag_value); 00342 char *dxf_attdef_get_prompt_value (DxfAttdef *attdef); 00343 DxfAttdef *dxf_attdef_set_prompt_value (DxfAttdef *attdef, char *prompt_value); 00344 char *dxf_attdef_get_text_style (DxfAttdef *attdef); 00345 DxfAttdef *dxf_attdef_set_text_style (DxfAttdef *attdef, char *text_style); 00346 DxfPoint *dxf_attdef_get_p0 (DxfAttdef *attdef); 00347 DxfAttdef *dxf_attdef_set_p0 (DxfAttdef *attdef, DxfPoint *p0); 00348 double dxf_attdef_get_x0 (DxfAttdef *attdef); 00349 DxfAttdef *dxf_attdef_set_x0 (DxfAttdef *attdef, double x0); 00350 double dxf_attdef_get_y0 (DxfAttdef *attdef); 00351 DxfAttdef *dxf_attdef_set_y0 (DxfAttdef *attdef, double y0); 00352 double dxf_attdef_get_z0 (DxfAttdef *attdef); 00353 DxfAttdef *dxf_attdef_set_z0 (DxfAttdef *attdef, double z0); 00354 DxfPoint *dxf_attdef_get_p1 (DxfAttdef *attdef); 00355 DxfAttdef *dxf_attdef_set_p1 (DxfAttdef *attdef, DxfPoint *p1); 00356 double dxf_attdef_get_x1 (DxfAttdef *attdef); 00357 DxfAttdef *dxf_attdef_set_x1 (DxfAttdef *attdef, double x1); 00358 double dxf_attdef_get_y1 (DxfAttdef *attdef); 00359 DxfAttdef *dxf_attdef_set_y1 (DxfAttdef *attdef, double y1); 00360 double dxf_attdef_get_z1 (DxfAttdef *attdef); 00361 DxfAttdef *dxf_attdef_set_z1 (DxfAttdef *attdef, double z1); 00362 double dxf_attdef_get_height (DxfAttdef *attdef); 00363 DxfAttdef * dxf_attdef_set_height (DxfAttdef *attdef, double height); 00364 double dxf_attdef_get_rel_x_scale (DxfAttdef *attdef); 00365 DxfAttdef *dxf_attdef_set_rel_x_scale (DxfAttdef *attdef, double rel_x_scale); 00366 double dxf_attdef_get_rot_angle (DxfAttdef *attdef); 00367 DxfAttdef *dxf_attdef_set_rot_angle (DxfAttdef *attdef, double rot_angle); 00368 double dxf_attdef_get_obl_angle (DxfAttdef *attdef); 00369 DxfAttdef *dxf_attdef_set_obl_angle (DxfAttdef *attdef, double obl_angle); 00370 int dxf_attdef_get_attr_flags (DxfAttdef *attdef); 00371 DxfAttdef *dxf_attdef_set_attr_flags (DxfAttdef *attdef, int attr_flags); 00372 int dxf_attdef_is_invisible (DxfAttdef *attdef); 00373 int dxf_attdef_is_constant (DxfAttdef *attdef); 00374 int dxf_attdef_is_verification_required (DxfAttdef *attdef); 00375 int dxf_attdef_is_preset (DxfAttdef *attdef); 00376 int dxf_attdef_get_text_flags (DxfAttdef *attdef); 00377 DxfAttdef *dxf_attdef_set_text_flags (DxfAttdef *attdef, int text_flags); 00378 int dxf_attdef_get_hor_align (DxfAttdef *attdef); 00379 DxfAttdef *dxf_attdef_set_hor_align (DxfAttdef *attdef, int hor_align); 00380 int dxf_attdef_get_field_length (DxfAttdef *attdef); 00381 DxfAttdef *dxf_attdef_set_field_length (DxfAttdef *attdef, int field_length); 00382 int dxf_attdef_get_vert_align (DxfAttdef *attdef); 00383 DxfAttdef *dxf_attdef_set_vert_align (DxfAttdef *attdef, int vert_align); 00384 double dxf_attdef_get_extr_x0 (DxfAttdef *attdef); 00385 DxfAttdef *dxf_attdef_set_extr_x0 (DxfAttdef *attdef, double extr_x0); 00386 double dxf_attdef_get_extr_y0 (DxfAttdef *attdef); 00387 DxfAttdef *dxf_attdef_set_extr_y0 (DxfAttdef *attdef, double extr_y0); 00388 double dxf_attdef_get_extr_z0 (DxfAttdef *attdef); 00389 DxfAttdef *dxf_attdef_set_extr_z0 (DxfAttdef *attdef, double extr_z0); 00390 DxfPoint *dxf_attdef_get_extrusion_vector_as_point (DxfAttdef *attdef); 00391 DxfAttdef *dxf_attdef_set_extrusion_vector_from_point (DxfAttdef *attdef, DxfPoint *point); 00392 DxfAttdef *dxf_attdef_set_extrusion_vector (DxfAttdef *attdef, double extr_x0, double extr_y0, double extr_z0); 00393 DxfAttdef *dxf_attdef_get_next (DxfAttdef *attdef); 00394 DxfAttdef *dxf_attdef_set_next (DxfAttdef *attdef, DxfAttdef *next); 00395 DxfAttdef *dxf_attdef_get_last (DxfAttdef *attdef); 00396 00397 00398 #ifdef __cplusplus 00399 } 00400 #endif 00401 00402 00403 #endif /* LIBDXF_SRC_ATTDEF_H */ 00404 00405 00406 /* EOF */