libDXF 0.0.1
A library with DXF related functions written in C.
|
00001 00043 #ifndef LIBDXF_SRC_MLINE_H 00044 #define LIBDXF_SRC_MLINE_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 00071 typedef struct 00072 dxf_mline_struct 00073 { 00074 /* Members common for all DXF drawable entities. */ 00075 int id_code; 00080 char *linetype; 00084 char *layer; 00088 double elevation; 00094 double thickness; 00098 double linetype_scale; 00102 int16_t visibility; 00110 int color; 00117 int paperspace; 00123 int graphics_data_size; 00132 int16_t shadow_mode; 00142 DxfBinaryGraphicsData *binary_graphics_data; 00148 char *dictionary_owner_soft; 00152 char *material; 00157 char *dictionary_owner_hard; 00161 int16_t lineweight; 00166 char *plot_style_name; 00170 long color_value; 00182 char *color_name; 00190 long transparency; 00198 /* Specific members for a DXF mline. */ 00199 char *style_name; 00205 DxfPoint *p0; 00208 DxfPoint *p1; 00212 DxfPoint *p2; 00216 DxfPoint *p3; 00220 double scale_factor; 00223 double element_parameters[DXF_MAX_PARAM]; 00227 double area_fill_parameters[DXF_MAX_PARAM]; 00231 int justification; 00239 int flags; 00248 int number_of_vertices; 00251 int number_of_elements; 00254 int number_of_parameters; 00258 int number_of_area_fill_parameters; 00262 double extr_x0; 00266 double extr_y0; 00270 double extr_z0; 00274 char *mlinestyle_dictionary; 00277 struct DxfMline *next; 00280 } DxfMline; 00281 00282 00283 DxfMline *dxf_mline_new (); 00284 DxfMline *dxf_mline_init (DxfMline *mline); 00285 DxfMline *dxf_mline_read (DxfFile *fp, DxfMline *mline); 00286 int dxf_mline_write (DxfFile *fp, DxfMline *mline); 00287 int dxf_mline_free (DxfMline *mline); 00288 void dxf_mline_free_chain (DxfMline *mlines); 00289 int dxf_mline_get_id_code (DxfMline *mline); 00290 DxfMline *dxf_mline_set_id_code (DxfMline *mline, int id_code); 00291 char *dxf_mline_get_linetype (DxfMline *mline); 00292 DxfMline *dxf_mline_set_linetype (DxfMline *mline, char *linetype); 00293 char *dxf_mline_get_layer (DxfMline *mline); 00294 DxfMline *dxf_mline_set_layer (DxfMline *mline, char *layer); 00295 double dxf_mline_get_elevation (DxfMline *mline); 00296 DxfMline *dxf_mline_set_elevation (DxfMline *mline, double elevation); 00297 double dxf_mline_get_thickness (DxfMline *mline); 00298 DxfMline *dxf_mline_set_thickness (DxfMline *mline, double thickness); 00299 double dxf_mline_get_linetype_scale (DxfMline *mline); 00300 DxfMline *dxf_mline_set_linetype_scale (DxfMline *mline, double linetype_scale); 00301 int16_t dxf_mline_get_visibility (DxfMline *mline); 00302 DxfMline *dxf_mline_set_visibility (DxfMline *mline, int16_t visibility); 00303 int dxf_mline_get_color (DxfMline *mline); 00304 DxfMline *dxf_mline_set_color (DxfMline *mline, int color); 00305 int dxf_mline_get_paperspace (DxfMline *mline); 00306 DxfMline *dxf_mline_set_paperspace (DxfMline *mline, int paperspace); 00307 int dxf_mline_get_graphics_data_size (DxfMline *mline); 00308 DxfMline *dxf_mline_set_graphics_data_size (DxfMline *mline, int graphics_data_size); 00309 int16_t dxf_mline_get_shadow_mode (DxfMline *mline); 00310 DxfMline *dxf_mline_set_shadow_mode (DxfMline *mline, int16_t shadow_mode); 00311 DxfBinaryGraphicsData *dxf_mline_get_binary_graphics_data (DxfMline *mline); 00312 DxfMline *dxf_mline_set_binary_graphics_data (DxfMline *mline, DxfBinaryGraphicsData *data); 00313 char *dxf_mline_get_dictionary_owner_soft (DxfMline *mline); 00314 DxfMline *dxf_mline_set_dictionary_owner_soft (DxfMline *mline, char *dictionary_owner_soft); 00315 char *dxf_mline_get_material (DxfMline *mline); 00316 DxfMline *dxf_mline_set_material (DxfMline *mline, char *material); 00317 char *dxf_mline_get_dictionary_owner_hard (DxfMline *mline); 00318 DxfMline *dxf_mline_set_dictionary_owner_hard (DxfMline *mline, char *dictionary_owner_hard); 00319 int16_t dxf_mline_get_lineweight (DxfMline *mline); 00320 DxfMline *dxf_mline_set_lineweight (DxfMline *mline, int16_t lineweight); 00321 char *dxf_mline_get_plot_style_name (DxfMline *mline); 00322 DxfMline *dxf_mline_set_plot_style_name (DxfMline *mline, char *plot_style_name); 00323 long dxf_mline_get_color_value (DxfMline *mline); 00324 DxfMline *dxf_mline_set_color_value (DxfMline *mline, long color_value); 00325 char *dxf_mline_get_color_name (DxfMline *mline); 00326 DxfMline *dxf_mline_set_color_name (DxfMline *mline, char *color_name); 00327 long dxf_mline_get_transparency (DxfMline *mline); 00328 DxfMline *dxf_mline_set_transparency (DxfMline *mline, long transparency); 00329 char *dxf_mline_get_style_name (DxfMline *mline); 00330 DxfMline *dxf_mline_set_style_name (DxfMline *mline, char *style_name); 00331 DxfPoint *dxf_mline_get_p0 (DxfMline *mline); 00332 DxfMline *dxf_mline_set_p0 (DxfMline *mline, DxfPoint *p0); 00333 double dxf_mline_get_x0 (DxfMline *mline); 00334 DxfMline *dxf_mline_set_x0 (DxfMline *mline, double x0); 00335 double dxf_mline_get_y0 (DxfMline *mline); 00336 DxfMline *dxf_mline_set_y0 (DxfMline *mline, double y0); 00337 double dxf_mline_get_z0 (DxfMline *mline); 00338 DxfMline *dxf_mline_set_z0 (DxfMline *mline, double z0); 00339 DxfPoint *dxf_mline_get_p1 (DxfMline *mline); 00340 DxfMline *dxf_mline_set_p1 (DxfMline *mline, DxfPoint *p1); 00341 double dxf_mline_get_x1 (DxfMline *mline); 00342 DxfMline *dxf_mline_set_x1 (DxfMline *mline, double x1); 00343 double dxf_mline_get_y1 (DxfMline *mline); 00344 DxfMline *dxf_mline_set_y1 (DxfMline *mline, double y1); 00345 double dxf_mline_get_z1 (DxfMline *mline); 00346 DxfPoint *dxf_mline_get_p2 (DxfMline *mline); 00347 DxfMline *dxf_mline_set_p2 (DxfMline *mline, DxfPoint *p2); 00348 double dxf_mline_get_x2 (DxfMline *mline); 00349 DxfMline *dxf_mline_set_x2 (DxfMline *mline, double x2); 00350 double dxf_mline_get_y2 (DxfMline *mline); 00351 DxfMline *dxf_mline_set_y2 (DxfMline *mline, double y2); 00352 double dxf_mline_get_z2 (DxfMline *mline); 00353 DxfMline *dxf_mline_set_z2 (DxfMline *mline, double z2); 00354 DxfPoint *dxf_mline_get_p3 (DxfMline *mline); 00355 DxfMline *dxf_mline_set_p3 (DxfMline *mline, DxfPoint *p3); 00356 double dxf_mline_get_x3 (DxfMline *mline); 00357 DxfMline *dxf_mline_set_x3 (DxfMline *mline, double x3); 00358 double dxf_mline_get_y3 (DxfMline *mline); 00359 DxfMline *dxf_mline_set_y3 (DxfMline *mline, double y3); 00360 double dxf_mline_get_z3 (DxfMline *mline); 00361 DxfMline *dxf_mline_set_z3 (DxfMline *mline, double z3); 00362 double dxf_mline_get_scale_factor (DxfMline *mline); 00363 DxfMline *dxf_mline_set_scale_factor (DxfMline *mline, double scale_factor); 00364 double dxf_mline_get_element_parameters (DxfMline *mline); 00365 DxfMline *dxf_mline_set_element_parameters (DxfMline *mline, double *element_parameters); 00366 double dxf_mline_get_area_fill_parameters (DxfMline *mline); 00367 DxfMline *dxf_mline_set_area_fill_parameters (DxfMline *mline, double *area_fill_parameters); 00368 int dxf_mline_get_justification (DxfMline *mline); 00369 DxfMline *dxf_mline_set_justification (DxfMline *mline, int justification); 00370 int dxf_mline_get_flags (DxfMline *mline); 00371 DxfMline *dxf_mline_set_flags (DxfMline *mline, int flags); 00372 int dxf_mline_get_number_of_vertices (DxfMline *mline); 00373 DxfMline *dxf_mline_set_number_of_vertices (DxfMline *mline, int number_of_vertices); 00374 int dxf_mline_get_number_of_elements (DxfMline *mline); 00375 DxfMline *dxf_mline_set_number_of_elements (DxfMline *mline, int number_of_elements); 00376 int dxf_mline_get_number_of_parameters (DxfMline *mline); 00377 DxfMline *dxf_mline_set_number_of_parameters (DxfMline *mline, int number_of_parameters); 00378 int dxf_mline_get_number_of_area_fill_parameters (DxfMline *mline); 00379 DxfMline *dxf_mline_set_number_of_area_fill_parameters (DxfMline *mline, int number_of_area_fill_parameters); 00380 DxfPoint *dxf_mline_get_extrusion_vector_as_point (DxfMline *mline); 00381 double dxf_mline_get_extr_x0 (DxfMline *mline); 00382 DxfMline *dxf_mline_set_extr_x0 (DxfMline *mline, double extr_x0); 00383 double dxf_mline_get_extr_y0 (DxfMline *mline); 00384 DxfMline *dxf_mline_set_extr_y0 (DxfMline *mline, double extr_y0); 00385 double dxf_mline_get_extr_z0 (DxfMline *mline); 00386 DxfMline *dxf_mline_set_extr_z0 (DxfMline *mline, double extr_z0); 00387 DxfMline *dxf_mline_set_extrusion_vector_from_point (DxfMline *mline, DxfPoint *point); 00388 DxfMline *dxf_mline_set_extrusion_vector (DxfMline *mline, double extr_x0, double extr_y0, double extr_z0); 00389 char *dxf_mline_get_mlinestyle_dictionary (DxfMline *mline); 00390 DxfMline *dxf_mline_set_mlinestyle_dictionary (DxfMline *mline, char *mlinestyle_dictionary); 00391 DxfMline *dxf_mline_get_next (DxfMline *mline); 00392 DxfMline *dxf_mline_set_next (DxfMline *mline, DxfMline *next); 00393 DxfMline *dxf_mline_get_last (DxfMline *mline); 00394 00395 00396 #ifdef __cplusplus 00397 } 00398 #endif 00399 00400 00401 #endif /* LIBDXF_SRC_MLINE_H */ 00402 00403 00404 /* EOF */