libDXF 0.0.1
A library with DXF related functions written in C.
|
00001 00044 #ifndef LIBDXF_SRC_MTEXT_H 00045 #define LIBDXF_SRC_MTEXT_H 00046 00047 00048 #include "global.h" 00049 #include "point.h" 00050 #include "binary_graphics_data.h" 00051 00052 00053 #ifdef __cplusplus 00054 extern "C" { 00055 #endif 00056 00057 00061 typedef struct 00062 dxf_mtext_struct 00063 { 00064 /* Members common for all DXF drawable entities. */ 00065 int id_code; 00070 char *linetype; 00074 char *layer; 00078 double elevation; 00084 double thickness; 00088 double linetype_scale; 00092 int16_t visibility; 00100 int color; 00107 int paperspace; 00113 int graphics_data_size; 00122 int16_t shadow_mode; 00132 DxfBinaryGraphicsData *binary_graphics_data; 00138 char *dictionary_owner_soft; 00142 char *material; 00147 char *dictionary_owner_hard; 00151 int16_t lineweight; 00156 char *plot_style_name; 00160 long color_value; 00172 char *color_name; 00180 long transparency; 00188 /* Specific members for a DXF mtext. */ 00189 char *text_value; 00199 char *text_additional_value[DXF_MAX_PARAM]; 00203 char *text_style; 00207 DxfPoint *p0; 00210 DxfPoint *p1; 00220 double height; 00223 double rectangle_width; 00226 double horizontal_width; 00233 double rectangle_height; 00237 double spacing_factor; 00243 double box_scale; 00247 double column_width; 00250 double column_gutter; 00253 double column_heights; 00257 double rot_angle; 00260 int background_color; 00265 int attachment_point; 00279 int drawing_direction; 00291 int spacing_style; 00300 int column_type; 00303 int column_count; 00306 int column_flow; 00309 int column_autoheight; 00312 int background_fill; 00321 double extr_x0; 00325 double extr_y0; 00329 double extr_z0; 00333 int32_t background_color_rgb; 00336 char *background_color_name; 00339 int32_t background_transparency; 00343 struct DxfMtext *next; 00346 } DxfMtext; 00347 00348 00349 DxfMtext *dxf_mtext_new (); 00350 DxfMtext *dxf_mtext_init (DxfMtext *mtext); 00351 DxfMtext *dxf_mtext_read (DxfFile *fp, DxfMtext *mtext); 00352 int dxf_mtext_write (DxfFile *fp, DxfMtext *mtext); 00353 int dxf_mtext_free (DxfMtext *mtext); 00354 void dxf_mtext_free_chain (DxfMtext *mtexts); 00355 int dxf_mtext_get_id_code (DxfMtext *mtext); 00356 DxfMtext *dxf_mtext_set_id_code (DxfMtext *mtext, int id_code); 00357 char *dxf_mtext_get_linetype (DxfMtext *mtext); 00358 DxfMtext *dxf_mtext_set_linetype (DxfMtext *mtext, char *linetype); 00359 char *dxf_mtext_get_layer (DxfMtext *mtext); 00360 DxfMtext *dxf_mtext_set_layer (DxfMtext *mtext, char *layer); 00361 double dxf_mtext_get_elevation (DxfMtext *mtext); 00362 DxfMtext *dxf_mtext_set_elevation (DxfMtext *mtext, double elevation); 00363 double dxf_mtext_get_thickness (DxfMtext *mtext); 00364 DxfMtext *dxf_mtext_set_thickness (DxfMtext *mtext, double thickness); 00365 double dxf_mtext_get_linetype_scale (DxfMtext *mtext); 00366 DxfMtext *dxf_mtext_set_linetype_scale (DxfMtext *mtext, double linetype_scale); 00367 int16_t dxf_mtext_get_visibility (DxfMtext *mtext); 00368 DxfMtext *dxf_mtext_set_visibility (DxfMtext *mtext, int16_t visibility); 00369 int dxf_mtext_get_color (DxfMtext *mtext); 00370 DxfMtext *dxf_mtext_set_color (DxfMtext *mtext, int color); 00371 int dxf_mtext_get_paperspace (DxfMtext *mtext); 00372 DxfMtext *dxf_mtext_set_paperspace (DxfMtext *mtext, int paperspace); 00373 int dxf_mtext_get_graphics_data_size (DxfMtext *mtext); 00374 DxfMtext *dxf_mtext_set_graphics_data_size (DxfMtext *mtext, int graphics_data_size); 00375 int16_t dxf_mtext_get_shadow_mode (DxfMtext *mtext); 00376 DxfMtext *dxf_mtext_set_shadow_mode (DxfMtext *mtext, int16_t shadow_mode); 00377 DxfBinaryGraphicsData *dxf_mtext_get_binary_graphics_data (DxfMtext *mtext); 00378 DxfMtext *dxf_mtext_set_binary_graphics_data (DxfMtext *mtext, DxfBinaryGraphicsData *data); 00379 char *dxf_mtext_get_dictionary_owner_soft (DxfMtext *mtext); 00380 DxfMtext *dxf_mtext_set_dictionary_owner_soft (DxfMtext *mtext, char *dictionary_owner_soft); 00381 char *dxf_mtext_get_material (DxfMtext *mtext); 00382 DxfMtext *dxf_mtext_set_material (DxfMtext *mtext, char *material); 00383 char *dxf_mtext_get_dictionary_owner_hard (DxfMtext *mtext); 00384 DxfMtext *dxf_mtext_set_dictionary_owner_hard (DxfMtext *mtext, char *dictionary_owner_hard); 00385 int16_t dxf_mtext_get_lineweight (DxfMtext *mtext); 00386 DxfMtext *dxf_mtext_set_lineweight (DxfMtext *mtext, int16_t lineweight); 00387 char *dxf_mtext_get_plot_style_name (DxfMtext *mtext); 00388 DxfMtext *dxf_mtext_set_plot_style_name (DxfMtext *mtext, char *plot_style_name); 00389 long dxf_mtext_get_color_value (DxfMtext *mtext); 00390 DxfMtext *dxf_mtext_set_color_value (DxfMtext *mtext, long color_value); 00391 char *dxf_mtext_get_color_name (DxfMtext *mtext); 00392 DxfMtext *dxf_mtext_set_color_name (DxfMtext *mtext, char *color_name); 00393 long dxf_mtext_get_transparency (DxfMtext *mtext); 00394 DxfMtext *dxf_mtext_set_transparency (DxfMtext *mtext, long transparency); 00395 char *dxf_mtext_get_text_value (DxfMtext *mtext); 00396 DxfMtext *dxf_mtext_set_text_value (DxfMtext *mtext, char *text_value); 00397 char *dxf_mtext_get_text_style (DxfMtext *mtext); 00398 DxfMtext *dxf_mtext_set_text_style (DxfMtext *mtext, char *text_style); 00399 DxfPoint *dxf_mtext_get_p0 (DxfMtext *mtext); 00400 DxfMtext *dxf_mtext_set_p0 (DxfMtext *mtext, DxfPoint *p0); 00401 double dxf_mtext_get_x0 (DxfMtext *mtext); 00402 DxfMtext *dxf_mtext_set_x0 (DxfMtext *mtext, double x0); 00403 double dxf_mtext_get_y0 (DxfMtext *mtext); 00404 DxfMtext *dxf_mtext_set_y0 (DxfMtext *mtext, double y0); 00405 double dxf_mtext_get_z0 (DxfMtext *mtext); 00406 DxfMtext *dxf_mtext_set_z0 (DxfMtext *mtext, double z0); 00407 DxfPoint *dxf_mtext_get_p1 (DxfMtext *mtext); 00408 DxfMtext *dxf_mtext_set_p1 (DxfMtext *mtext, DxfPoint *p1); 00409 double dxf_mtext_get_x1 (DxfMtext *mtext); 00410 DxfMtext *dxf_mtext_set_x1 (DxfMtext *mtext, double x1); 00411 double dxf_mtext_get_y1 (DxfMtext *mtext); 00412 DxfMtext *dxf_mtext_set_y1 (DxfMtext *mtext, double y1); 00413 double dxf_mtext_get_z1 (DxfMtext *mtext); 00414 DxfMtext *dxf_mtext_set_z1 (DxfMtext *mtext, double z1); 00415 double dxf_mtext_get_height (DxfMtext *mtext); 00416 DxfMtext *dxf_mtext_set_height (DxfMtext *mtext, double height); 00417 double dxf_mtext_get_rectangle_width (DxfMtext *mtext); 00418 DxfMtext *dxf_mtext_set_rectangle_width (DxfMtext *mtext, double rectangle_width); 00419 double dxf_mtext_get_horizontal_width (DxfMtext *mtext); 00420 DxfMtext *dxf_mtext_set_horizontal_width (DxfMtext *mtext, double horizontal_width); 00421 double dxf_mtext_get_rectangle_height (DxfMtext *mtext); 00422 DxfMtext *dxf_mtext_set_rectangle_height (DxfMtext *mtext, double rectangle_height); 00423 double dxf_mtext_get_spacing_factor (DxfMtext *mtext); 00424 DxfMtext *dxf_mtext_set_spacing_factor (DxfMtext *mtext, double spacing_factor); 00425 double dxf_mtext_get_box_scale (DxfMtext *mtext); 00426 DxfMtext *dxf_mtext_set_box_scale (DxfMtext *mtext, double box_scale); 00427 double dxf_mtext_get_column_width (DxfMtext *mtext); 00428 DxfMtext *dxf_mtext_set_column_width (DxfMtext *mtext, double column_width); 00429 double dxf_mtext_get_column_gutter (DxfMtext *mtext); 00430 DxfMtext *dxf_mtext_set_column_gutter (DxfMtext *mtext, double column_gutter); 00431 double dxf_mtext_get_column_heights (DxfMtext *mtext); 00432 DxfMtext *dxf_mtext_set_column_heights (DxfMtext *mtext, double column_heights); 00433 double dxf_mtext_get_rot_angle (DxfMtext *mtext); 00434 DxfMtext *dxf_mtext_set_rot_angle (DxfMtext *mtext, double rot_angle); 00435 int dxf_mtext_get_background_color (DxfMtext *mtext); 00436 DxfMtext *dxf_mtext_set_background_color (DxfMtext *mtext, int background_color); 00437 int dxf_mtext_get_attachment_point (DxfMtext *mtext); 00438 DxfMtext *dxf_mtext_set_attachment_point (DxfMtext *mtext, int attachment_point); 00439 int dxf_mtext_get_drawing_direction (DxfMtext *mtext); 00440 DxfMtext *dxf_mtext_set_drawing_direction (DxfMtext *mtext, int drawing_direction); 00441 int dxf_mtext_get_spacing_style (DxfMtext *mtext); 00442 DxfMtext *dxf_mtext_set_spacing_style (DxfMtext *mtext, int spacing_style); 00443 int dxf_mtext_get_column_type (DxfMtext *mtext); 00444 DxfMtext *dxf_mtext_set_column_type (DxfMtext *mtext, int column_type); 00445 int dxf_mtext_get_column_count (DxfMtext *mtext); 00446 DxfMtext *dxf_mtext_set_column_count (DxfMtext *mtext, int column_count); 00447 int dxf_mtext_get_column_flow (DxfMtext *mtext); 00448 DxfMtext *dxf_mtext_set_column_flow (DxfMtext *mtext, int column_flow); 00449 int dxf_mtext_get_column_autoheight (DxfMtext *mtext); 00450 DxfMtext *dxf_mtext_set_column_autoheight (DxfMtext *mtext, int column_autoheight); 00451 int dxf_mtext_get_background_fill (DxfMtext *mtext); 00452 DxfMtext *dxf_mtext_set_background_fill (DxfMtext *mtext, int background_fill); 00453 double dxf_mtext_get_extr_x0 (DxfMtext *mtext); 00454 DxfMtext *dxf_mtext_set_extr_x0 (DxfMtext *mtext, double extr_x0); 00455 double dxf_mtext_get_extr_y0 (DxfMtext *mtext); 00456 DxfMtext *dxf_mtext_set_extr_y0 (DxfMtext *mtext, double extr_y0); 00457 double dxf_mtext_get_extr_z0 (DxfMtext *mtext); 00458 DxfMtext *dxf_mtext_set_extr_z0 (DxfMtext *mtext, double extr_z0); 00459 DxfMtext *dxf_mtext_set_extrusion_vector_from_point (DxfMtext *mtext, DxfPoint *point); 00460 DxfMtext *dxf_mtext_set_extrusion_vector (DxfMtext *mtext, double extr_x0, double extr_y0, double extr_z0); 00461 int32_t dxf_mtext_get_background_color_rgb (DxfMtext *mtext); 00462 DxfMtext *dxf_mtext_set_background_color_rgb (DxfMtext *mtext, int32_t background_color_rgb); 00463 char *dxf_mtext_get_background_color_name (DxfMtext *mtext); 00464 DxfMtext *dxf_mtext_set_background_color_name (DxfMtext *mtext, char *background_color_name); 00465 int32_t dxf_mtext_get_background_transparency (DxfMtext *mtext); 00466 DxfMtext *dxf_mtext_set_background_transparency (DxfMtext *mtext, int32_t background_transparency); 00467 DxfMtext *dxf_mtext_get_next (DxfMtext *mtext); 00468 DxfMtext *dxf_mtext_set_next (DxfMtext *mtext, DxfMtext *next); 00469 DxfMtext *dxf_mtext_get_last (DxfMtext *mtext); 00470 00471 00472 #ifdef __cplusplus 00473 } 00474 #endif 00475 00476 00477 #endif /* LIBDXF_SRC_MTEXT_H */ 00478 00479 00480 /* EOF */