libDXF 0.0.1
A library with DXF related functions written in C.
|
00001 00042 #ifndef LIBDXF_SRC_LINE_H 00043 #define LIBDXF_SRC_LINE_H 00044 00045 00046 #include "global.h" 00047 #include "binary_graphics_data.h" 00048 #include "point.h" 00049 00050 00051 #ifdef __cplusplus 00052 extern "C" { 00053 #endif 00054 00055 00059 typedef struct 00060 dxf_line_struct 00061 { 00062 /* Members common for all DXF drawable entities. */ 00063 int id_code; 00068 char *linetype; 00072 char *layer; 00076 double elevation; 00082 double thickness; 00086 double linetype_scale; 00090 int16_t visibility; 00098 int color; 00105 int paperspace; 00111 int graphics_data_size; 00120 int16_t shadow_mode; 00130 DxfBinaryGraphicsData *binary_graphics_data; 00136 char *dictionary_owner_soft; 00140 char *material; 00145 char *dictionary_owner_hard; 00149 int16_t lineweight; 00154 char *plot_style_name; 00158 long color_value; 00170 char *color_name; 00178 long transparency; 00186 /* Specific members for a DXF line. */ 00187 DxfPoint *p0; 00190 DxfPoint *p1; 00193 double extr_x0; 00197 double extr_y0; 00201 double extr_z0; 00205 struct DxfLine *next; 00208 } DxfLine; 00209 00210 00211 DxfLine *dxf_line_new (); 00212 DxfLine *dxf_line_init (DxfLine *line); 00213 DxfLine *dxf_line_read (DxfFile *fp, DxfLine *line); 00214 int dxf_line_write (DxfFile *fp, DxfLine *line); 00215 int dxf_line_free (DxfLine *line); 00216 void dxf_line_free_chain (DxfLine *lines); 00217 int dxf_line_get_id_code (DxfLine *line); 00218 DxfLine *dxf_line_set_id_code (DxfLine *line, int id_code); 00219 char *dxf_line_get_linetype (DxfLine *line); 00220 DxfLine *dxf_line_set_linetype (DxfLine *line, char *linetype); 00221 char *dxf_line_get_layer (DxfLine *line); 00222 DxfLine *dxf_line_set_layer (DxfLine *line, char *layer); 00223 double dxf_line_get_elevation (DxfLine *line); 00224 DxfLine *dxf_line_set_elevation (DxfLine *line, double elevation); 00225 double dxf_line_get_thickness (DxfLine *line); 00226 DxfLine *dxf_line_set_thickness (DxfLine *line, double thickness); 00227 double dxf_line_get_linetype_scale (DxfLine *line); 00228 DxfLine *dxf_line_set_linetype_scale (DxfLine *line, double linetype_scale); 00229 int16_t dxf_line_get_visibility (DxfLine *line); 00230 DxfLine *dxf_line_set_visibility (DxfLine *line, int16_t visibility); 00231 int dxf_line_get_color (DxfLine *line); 00232 DxfLine *dxf_line_set_color (DxfLine *line, int color); 00233 int dxf_line_get_paperspace (DxfLine *line); 00234 DxfLine *dxf_line_set_paperspace (DxfLine *line, int paperspace); 00235 int dxf_line_get_graphics_data_size (DxfLine *line); 00236 DxfLine *dxf_line_set_graphics_data_size (DxfLine *line, int graphics_data_size); 00237 int16_t dxf_line_get_shadow_mode (DxfLine *line); 00238 DxfLine *dxf_line_set_shadow_mode (DxfLine *line, int16_t shadow_mode); 00239 DxfBinaryGraphicsData *dxf_line_get_binary_graphics_data (DxfLine *line); 00240 DxfLine *dxf_line_set_binary_graphics_data (DxfLine *line, DxfBinaryGraphicsData *data); 00241 char *dxf_line_get_dictionary_owner_soft (DxfLine *line); 00242 DxfLine *dxf_line_set_dictionary_owner_soft (DxfLine *line, char *dictionary_owner_soft); 00243 char *dxf_line_get_material (DxfLine *line); 00244 DxfLine *dxf_line_set_material (DxfLine *line, char *material); 00245 char *dxf_line_get_dictionary_owner_hard (DxfLine *line); 00246 DxfLine *dxf_line_set_dictionary_owner_hard (DxfLine *line, char *dictionary_owner_hard); 00247 int16_t dxf_line_get_lineweight (DxfLine *line); 00248 DxfLine *dxf_line_set_lineweight (DxfLine *line, int16_t lineweight); 00249 char *dxf_line_get_plot_style_name (DxfLine *line); 00250 DxfLine *dxf_line_set_plot_style_name (DxfLine *line, char *plot_style_name); 00251 long dxf_line_get_color_value (DxfLine *line); 00252 DxfLine *dxf_line_set_color_value (DxfLine *line, long color_value); 00253 char *dxf_line_get_color_name (DxfLine *line); 00254 DxfLine *dxf_line_set_color_name (DxfLine *line, char *color_name); 00255 long dxf_line_get_transparency (DxfLine *line); 00256 DxfLine *dxf_line_set_transparency (DxfLine *line, long transparency); 00257 DxfPoint *dxf_line_get_p0 (DxfLine *line); 00258 DxfLine *dxf_line_set_p0 (DxfLine *line, DxfPoint *p0); 00259 double dxf_line_get_x0 (DxfLine *line); 00260 DxfLine *dxf_line_set_x0 (DxfLine *line, double x0); 00261 double dxf_line_get_y0 (DxfLine *line); 00262 DxfLine *dxf_line_set_y0 (DxfLine *line, double y0); 00263 double dxf_line_get_z0 (DxfLine *line); 00264 DxfLine *dxf_line_set_z0 (DxfLine *line, double z0); 00265 DxfPoint *dxf_line_get_p1 (DxfLine *line); 00266 DxfLine *dxf_line_set_p1 (DxfLine *line, DxfPoint *p1); 00267 double dxf_line_get_x1 (DxfLine *line); 00268 DxfLine *dxf_line_set_x1 (DxfLine *line, double x1); 00269 double dxf_line_get_y1 (DxfLine *line); 00270 DxfLine *dxf_line_set_y1 (DxfLine *line, double y1); 00271 double dxf_line_get_z1 (DxfLine *line); 00272 DxfLine *dxf_line_set_z1 (DxfLine *line, double z1); 00273 double dxf_line_get_extr_x0 (DxfLine *line); 00274 DxfLine *dxf_line_set_extr_x0 (DxfLine *line, double extr_x0); 00275 double dxf_line_get_extr_y0 (DxfLine *line); 00276 DxfLine *dxf_line_set_extr_y0 (DxfLine *line, double extr_y0); 00277 double dxf_line_get_extr_z0 (DxfLine *line); 00278 DxfLine *dxf_line_set_extr_z0 (DxfLine *line, double extr_z0); 00279 DxfPoint *dxf_line_get_extrusion_vector_as_point (DxfLine *line); 00280 DxfLine *dxf_line_set_extrusion_vector (DxfLine *line, double extr_x0, double extr_y0, double extr_z0); 00281 DxfLine *dxf_line_get_next (DxfLine *line); 00282 DxfLine *dxf_line_set_next (DxfLine *line, DxfLine *next); 00283 DxfLine *dxf_line_get_last (DxfLine *line); 00284 DxfPoint *dxf_line_calculate_mid_point (DxfLine *line, int id_code, int inheritance); 00285 double dxf_line_calculate_length (DxfLine *line); 00286 DxfLine *dxf_line_create_from_points (DxfPoint *p1, DxfPoint *p2, int id_code, int inheritance); 00287 00288 00289 #ifdef __cplusplus 00290 } 00291 #endif 00292 00293 00294 #endif /* LIBDXF_SRC_LINE_H */ 00295 00296 00297 /* EOF */