libDXF 0.0.1
A library with DXF related functions written in C.
|
00001 00043 #ifndef LIBDXF_SRC_DIMENSION_H 00044 #define LIBDXF_SRC_DIMENSION_H 00045 00046 00047 #include "global.h" 00048 #include "point.h" 00049 #include "binary_graphics_data.h" 00050 00051 00052 #ifdef __cplusplus 00053 extern "C" { 00054 #endif 00055 00056 00060 typedef struct 00061 dxf_dimension_struct 00062 { 00063 /* Members common for all DXF drawable entities. */ 00064 int id_code; 00069 char *linetype; 00073 char *layer; 00077 double elevation; 00083 double thickness; 00087 double linetype_scale; 00091 int16_t visibility; 00099 int color; 00106 int paperspace; 00112 int graphics_data_size; 00121 int16_t shadow_mode; 00131 DxfBinaryGraphicsData *binary_graphics_data; 00137 char *dictionary_owner_soft; 00141 char *material; 00146 char *dictionary_owner_hard; 00150 int16_t lineweight; 00155 char *plot_style_name; 00159 long color_value; 00171 char *color_name; 00179 long transparency; 00187 /* Specific members for a DXF dimension. */ 00188 char *dim_text; 00195 char *dimblock_name; 00199 char *dimstyle_name; 00202 DxfPoint *p0; 00205 DxfPoint *p1; 00208 DxfPoint *p2; 00211 DxfPoint *p3; 00214 DxfPoint *p4; 00217 DxfPoint *p5; 00221 DxfPoint *p6; 00224 double leader_length; 00227 double text_line_spacing_factor; 00233 double actual_measurement; 00236 double angle; 00240 double hor_dir; 00259 double obl_angle; 00266 double text_angle; 00271 int flag; 00297 int attachment_point; 00309 int text_line_spacing; 00315 double extr_x0; 00319 double extr_y0; 00323 double extr_z0; 00327 int16_t version_number; 00332 struct DxfDimension *next; 00335 } DxfDimension; 00336 00337 00338 DxfDimension *dxf_dimension_new (); 00339 DxfDimension *dxf_dimension_init (DxfDimension *dimension); 00340 DxfDimension *dxf_dimension_read (DxfFile *fp, DxfDimension *dimension); 00341 int dxf_dimension_write (DxfFile *fp, DxfDimension *dimension); 00342 int dxf_dimension_free (DxfDimension *dimension); 00343 void dxf_dimension_free_chain (DxfDimension *dimensions); 00344 int dxf_dimension_get_id_code (DxfDimension *dimension); 00345 DxfDimension *dxf_dimension_set_id_code (DxfDimension *dimension, int id_code); 00346 char *dxf_dimension_get_linetype (DxfDimension *dimension); 00347 DxfDimension *dxf_dimension_set_linetype (DxfDimension *dimension, char *linetype); 00348 char *dxf_dimension_get_layer (DxfDimension *dimension); 00349 DxfDimension *dxf_dimension_set_layer (DxfDimension *dimension, char *layer); 00350 double dxf_dimension_get_elevation (DxfDimension *dimension); 00351 DxfDimension *dxf_dimension_set_elevation (DxfDimension *dimension, double elevation); 00352 double dxf_dimension_get_thickness (DxfDimension *dimension); 00353 DxfDimension *dxf_dimension_set_thickness (DxfDimension *dimension, double thickness); 00354 double dxf_dimension_get_linetype_scale (DxfDimension *dimension); 00355 DxfDimension *dxf_dimension_set_linetype_scale (DxfDimension *dimension, double linetype_scale); 00356 int16_t dxf_dimension_get_visibility (DxfDimension *dimension); 00357 DxfDimension *dxf_dimension_set_visibility (DxfDimension *dimension, int16_t visibility); 00358 int dxf_dimension_get_color (DxfDimension *dimension); 00359 DxfDimension *dxf_dimension_set_color (DxfDimension *dimension, int color); 00360 int dxf_dimension_get_paperspace (DxfDimension *dimension); 00361 DxfDimension *dxf_dimension_set_paperspace (DxfDimension *dimension, int paperspace); 00362 int dxf_dimension_get_graphics_data_size (DxfDimension *dimension); 00363 DxfDimension *dxf_dimension_set_graphics_data_size (DxfDimension *dimension, int graphics_data_size); 00364 int16_t dxf_dimension_get_shadow_mode (DxfDimension *dimension); 00365 DxfDimension *dxf_dimension_set_shadow_mode (DxfDimension *dimension, int16_t shadow_mode); 00366 DxfBinaryGraphicsData *dxf_dimension_get_binary_graphics_data (DxfDimension *dimension); 00367 DxfDimension *dxf_dimension_set_binary_graphics_data (DxfDimension *dimension, DxfBinaryGraphicsData *data); 00368 char *dxf_dimension_get_dictionary_owner_soft (DxfDimension *dimension); 00369 DxfDimension *dxf_dimension_set_dictionary_owner_soft (DxfDimension *dimension, char *dictionary_owner_soft); 00370 char *dxf_dimension_get_material (DxfDimension *dimension); 00371 DxfDimension *dxf_dimension_set_material (DxfDimension *dimension, char *material); 00372 char *dxf_dimension_get_dictionary_owner_hard (DxfDimension *dimension); 00373 DxfDimension *dxf_dimension_set_dictionary_owner_hard (DxfDimension *dimension, char *dictionary_owner_hard); 00374 int16_t dxf_dimension_get_lineweight (DxfDimension *dimension); 00375 DxfDimension *dxf_dimension_set_lineweight (DxfDimension *dimension, int16_t lineweight); 00376 char *dxf_dimension_get_plot_style_name (DxfDimension *dimension); 00377 DxfDimension *dxf_dimension_set_plot_style_name (DxfDimension *dimension, char *plot_style_name); 00378 long dxf_dimension_get_color_value (DxfDimension *dimension); 00379 DxfDimension *dxf_dimension_set_color_value (DxfDimension *dimension, long color_value); 00380 char *dxf_dimension_get_color_name (DxfDimension *dimension); 00381 DxfDimension *dxf_dimension_set_color_name (DxfDimension *dimension, char *color_name); 00382 long dxf_dimension_get_transparency (DxfDimension *dimension); 00383 DxfDimension *dxf_dimension_set_transparency (DxfDimension *dimension, long transparency); 00384 char *dxf_dimension_get_dim_text (DxfDimension *dimension); 00385 DxfDimension *dxf_dimension_set_dim_text (DxfDimension *dimension, char *dim_text); 00386 char *dxf_dimension_get_dimblock_name (DxfDimension *dimension); 00387 DxfDimension *dxf_dimension_set_dimblock_name (DxfDimension *dimension, char *dimblock_name); 00388 char *dxf_dimension_get_dimstyle_name (DxfDimension *dimension); 00389 DxfDimension *dxf_dimension_set_dimstyle_name (DxfDimension *dimension, char *dimstyle_name); 00390 DxfPoint *dxf_dimension_get_p0 (DxfDimension *dimension); 00391 DxfDimension *dxf_dimension_set_p0 (DxfDimension *dimension, DxfPoint *p0); 00392 double dxf_dimension_get_x0 (DxfDimension *dimension); 00393 DxfDimension *dxf_dimension_set_x0 (DxfDimension *dimension, double x0); 00394 double dxf_dimension_get_y0 (DxfDimension *dimension); 00395 DxfDimension *dxf_dimension_set_y0 (DxfDimension *dimension, double y0); 00396 double dxf_dimension_get_z0 (DxfDimension *dimension); 00397 DxfDimension *dxf_dimension_set_z0 (DxfDimension *dimension, double z0); 00398 DxfPoint *dxf_dimension_get_p1 (DxfDimension *dimension); 00399 DxfDimension *dxf_dimension_set_p1 (DxfDimension *dimension, DxfPoint *p1); 00400 double dxf_dimension_get_x1 (DxfDimension *dimension); 00401 DxfDimension *dxf_dimension_set_x1 (DxfDimension *dimension, double x1); 00402 double dxf_dimension_get_y1 (DxfDimension *dimension); 00403 DxfDimension *dxf_dimension_set_y1 (DxfDimension *dimension, double y1); 00404 double dxf_dimension_get_z1 (DxfDimension *dimension); 00405 DxfDimension *dxf_dimension_set_z1 (DxfDimension *dimension, double z1); 00406 DxfPoint *dxf_dimension_get_p2 (DxfDimension *dimension); 00407 DxfDimension *dxf_dimension_set_p2 (DxfDimension *dimension, DxfPoint *p2); 00408 double dxf_dimension_get_x2 (DxfDimension *dimension); 00409 DxfDimension *dxf_dimension_set_x2 (DxfDimension *dimension, double x2); 00410 double dxf_dimension_get_y2 (DxfDimension *dimension); 00411 DxfDimension *dxf_dimension_set_y2 (DxfDimension *dimension, double y2); 00412 double dxf_dimension_get_z2 (DxfDimension *dimension); 00413 DxfDimension *dxf_dimension_set_z2 (DxfDimension *dimension, double z2); 00414 DxfPoint *dxf_dimension_get_p3 (DxfDimension *dimension); 00415 DxfDimension *dxf_dimension_set_p3 (DxfDimension *dimension, DxfPoint *p3); 00416 double dxf_dimension_get_x3 (DxfDimension *dimension); 00417 DxfDimension *dxf_dimension_set_x3 (DxfDimension *dimension, double x3); 00418 double dxf_dimension_get_y3 (DxfDimension *dimension); 00419 DxfDimension *dxf_dimension_set_y3 (DxfDimension *dimension, double y3); 00420 double dxf_dimension_get_z3 (DxfDimension *dimension); 00421 DxfDimension *dxf_dimension_set_z3 (DxfDimension *dimension, double z3); 00422 DxfPoint *dxf_dimension_get_p4 (DxfDimension *dimension); 00423 DxfDimension *dxf_dimension_set_p4 (DxfDimension *dimension, DxfPoint *p4); 00424 double dxf_dimension_get_x4 (DxfDimension *dimension); 00425 DxfDimension *dxf_dimension_set_x4 (DxfDimension *dimension, double x4); 00426 double dxf_dimension_get_y4 (DxfDimension *dimension); 00427 DxfDimension *dxf_dimension_set_y4 (DxfDimension *dimension, double y4); 00428 double dxf_dimension_get_z4 (DxfDimension *dimension); 00429 DxfDimension *dxf_dimension_set_z4 (DxfDimension *dimension, double z4); 00430 DxfPoint *dxf_dimension_get_p5 (DxfDimension *dimension); 00431 DxfDimension *dxf_dimension_set_p5 (DxfDimension *dimension, DxfPoint *p5); 00432 double dxf_dimension_get_x5 (DxfDimension *dimension); 00433 DxfDimension *dxf_dimension_set_x5 (DxfDimension *dimension, double x5); 00434 double dxf_dimension_get_y5 (DxfDimension *dimension); 00435 DxfDimension *dxf_dimension_set_y5 (DxfDimension *dimension, double y5); 00436 double dxf_dimension_get_z5 (DxfDimension *dimension); 00437 DxfDimension *dxf_dimension_set_z5 (DxfDimension *dimension, double z5); 00438 DxfPoint *dxf_dimension_get_p6 (DxfDimension *dimension); 00439 DxfDimension *dxf_dimension_set_p6 (DxfDimension *dimension, DxfPoint *p6); 00440 double dxf_dimension_get_x6 (DxfDimension *dimension); 00441 DxfDimension *dxf_dimension_set_x6 (DxfDimension *dimension, double x6); 00442 double dxf_dimension_get_y6 (DxfDimension *dimension); 00443 DxfDimension *dxf_dimension_set_y6 (DxfDimension *dimension, double y6); 00444 double dxf_dimension_get_z6 (DxfDimension *dimension); 00445 DxfDimension *dxf_dimension_set_z6 (DxfDimension *dimension, double z6); 00446 double dxf_dimension_get_leader_length (DxfDimension *dimension); 00447 DxfDimension *dxf_dimension_set_leader_length (DxfDimension *dimension, double leader_length); 00448 double dxf_dimension_get_text_line_spacing_factor (DxfDimension *dimension); 00449 DxfDimension *dxf_dimension_set_text_line_spacing_factor (DxfDimension *dimension, double text_line_spacing_factor); 00450 double dxf_dimension_get_actual_measurement (DxfDimension *dimension); 00451 DxfDimension *dxf_dimension_set_actual_measurement (DxfDimension *dimension, double actual_measurement); 00452 double dxf_dimension_get_angle (DxfDimension *dimension); 00453 DxfDimension *dxf_dimension_set_angle (DxfDimension *dimension, double angle); 00454 double dxf_dimension_get_hor_dir (DxfDimension *dimension); 00455 DxfDimension *dxf_dimension_set_hor_dir (DxfDimension *dimension, double hor_dir); 00456 double dxf_dimension_get_obl_angle (DxfDimension *dimension); 00457 DxfDimension *dxf_dimension_set_obl_angle (DxfDimension *dimension, double obl_angle); 00458 double dxf_dimension_get_text_angle (DxfDimension *dimension); 00459 DxfDimension *dxf_dimension_set_text_angle (DxfDimension *dimension, double text_angle); 00460 int dxf_dimension_get_flag (DxfDimension *dimension); 00461 DxfDimension *dxf_dimension_set_flag (DxfDimension *dimension, int flag); 00462 int dxf_dimension_get_attachment_point (DxfDimension *dimension); 00463 DxfDimension *dxf_dimension_set_attachment_point (DxfDimension *dimension, int attachment_point); 00464 int dxf_dimension_get_text_line_spacing (DxfDimension *dimension); 00465 DxfDimension *dxf_dimension_set_text_line_spacing (DxfDimension *dimension, int text_line_spacing); 00466 double dxf_dimension_get_extr_x0 (DxfDimension *dimension); 00467 DxfDimension *dxf_dimension_set_extr_x0 (DxfDimension *dimension, double extr_x0); 00468 double dxf_dimension_get_extr_y0 (DxfDimension *dimension); 00469 DxfDimension *dxf_dimension_set_extr_y0 (DxfDimension *dimension, double extr_y0); 00470 double dxf_dimension_get_extr_z0 (DxfDimension *dimension); 00471 DxfDimension *dxf_dimension_set_extr_z0 (DxfDimension *dimension, double extr_z0); 00472 DxfPoint *dxf_dimension_get_extrusion_vector_as_point (DxfDimension *dimension); 00473 DxfDimension *dxf_dimension_set_extrusion_vector (DxfDimension *dimension, double extr_x0, double extr_y0, double extr_z0); 00474 DxfDimension *dxf_dimension_get_next (DxfDimension *dimension); 00475 DxfDimension *dxf_dimension_set_next (DxfDimension *dimension, DxfDimension *next); 00476 DxfDimension *dxf_dimension_get_last (DxfDimension *dimension); 00477 00478 00479 #ifdef __cplusplus 00480 } 00481 #endif 00482 00483 00484 #endif /* LIBDXF_SRC_DIMENSION_H */ 00485 00486 00487 /* EOF */