libDXF 0.0.1
A library with DXF related functions written in C.
|
00001 00036 #ifndef LIBDXF_SRC_ARC_H 00037 #define LIBDXF_SRC_ARC_H 00038 00039 00040 #include "global.h" 00041 #include "point.h" 00042 #include "binary_graphics_data.h" 00043 00044 00045 #ifdef __cplusplus 00046 extern "C" { 00047 #endif 00048 00049 00059 typedef struct 00060 dxf_arc_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 arc. */ 00187 DxfPoint *p0; 00190 double radius; 00193 double start_angle; 00196 double end_angle; 00199 double extr_x0; 00203 double extr_y0; 00207 double extr_z0; 00211 struct DxfArc *next; 00214 } DxfArc; 00215 00216 00217 DxfArc *dxf_arc_new (); 00218 DxfArc *dxf_arc_init (DxfArc *arc); 00219 DxfArc *dxf_arc_read (DxfFile *fp, DxfArc *arc); 00220 int dxf_arc_write (DxfFile *fp, DxfArc *arc); 00221 int dxf_arc_free (DxfArc *arc); 00222 void dxf_arc_free_chain (DxfArc *arcs); 00223 int dxf_arc_get_id_code (DxfArc *arc); 00224 DxfArc *dxf_arc_set_id_code (DxfArc *arc, int id_code); 00225 char *dxf_arc_get_linetype (DxfArc *arc); 00226 DxfArc *dxf_arc_set_linetype (DxfArc *arc, char *linetype); 00227 char *dxf_arc_get_layer (DxfArc *arc); 00228 DxfArc *dxf_arc_set_layer (DxfArc *arc, char *layer); 00229 double dxf_arc_get_elevation (DxfArc *arc); 00230 DxfArc *dxf_arc_set_elevation (DxfArc *arc, double elevation); 00231 double dxf_arc_get_thickness (DxfArc *arc); 00232 DxfArc *dxf_arc_set_thickness (DxfArc *arc, double thickness); 00233 double dxf_arc_get_linetype_scale (DxfArc *arc); 00234 DxfArc *dxf_arc_set_linetype_scale (DxfArc *arc, double linetype_scale); 00235 int16_t dxf_arc_get_visibility (DxfArc *arc); 00236 DxfArc *dxf_arc_set_visibility (DxfArc *arc, int16_t visibility); 00237 int dxf_arc_get_color (DxfArc *arc); 00238 DxfArc *dxf_arc_set_color (DxfArc *arc, int color); 00239 int dxf_arc_get_paperspace (DxfArc *arc); 00240 DxfArc *dxf_arc_set_paperspace (DxfArc *arc, int paperspace); 00241 int dxf_arc_get_graphics_data_size (DxfArc *arc); 00242 DxfArc *dxf_arc_set_graphics_data_size (DxfArc *arc, int graphics_data_size); 00243 int16_t dxf_arc_get_shadow_mode (DxfArc *arc); 00244 DxfArc *dxf_arc_set_shadow_mode (DxfArc *arc, int16_t shadow_mode); 00245 DxfBinaryGraphicsData *dxf_arc_get_binary_graphics_data (DxfArc *arc); 00246 DxfArc *dxf_arc_set_binary_graphics_data (DxfArc *arc, DxfBinaryGraphicsData *data); 00247 char *dxf_arc_get_dictionary_owner_soft (DxfArc *arc); 00248 DxfArc *dxf_arc_set_dictionary_owner_soft (DxfArc *arc, char *dictionary_owner_soft); 00249 char *dxf_arc_get_material (DxfArc *arc); 00250 DxfArc *dxf_arc_set_material (DxfArc *arc, char *material); 00251 char *dxf_arc_get_dictionary_owner_hard (DxfArc *arc); 00252 DxfArc *dxf_arc_set_dictionary_owner_hard (DxfArc *arc, char *dictionary_owner_hard); 00253 int16_t dxf_arc_get_lineweight (DxfArc *arc); 00254 DxfArc *dxf_arc_set_lineweight (DxfArc *arc, int16_t lineweight); 00255 char *dxf_arc_get_plot_style_name (DxfArc *arc); 00256 DxfArc *dxf_arc_set_plot_style_name (DxfArc *arc, char *plot_style_name); 00257 long dxf_arc_get_color_value (DxfArc *arc); 00258 DxfArc *dxf_arc_set_color_value (DxfArc *arc, long color_value); 00259 char *dxf_arc_get_color_name (DxfArc *arc); 00260 DxfArc *dxf_arc_set_color_name (DxfArc *arc, char *color_name); 00261 long dxf_arc_get_transparency (DxfArc *arc); 00262 DxfArc *dxf_arc_set_transparency (DxfArc *arc, long transparency); 00263 DxfPoint *dxf_arc_get_p0 (DxfArc *arc); 00264 DxfArc *dxf_arc_set_p0 (DxfArc *arc, DxfPoint *p0); 00265 double dxf_arc_get_x0 (DxfArc *arc); 00266 DxfArc *dxf_arc_set_x0 (DxfArc *arc, double x0); 00267 double dxf_arc_get_y0 (DxfArc *arc); 00268 DxfArc *dxf_arc_set_y0 (DxfArc *arc, double y0); 00269 double dxf_arc_get_z0 (DxfArc *arc); 00270 DxfArc *dxf_arc_set_z0 (DxfArc *arc, double z0); 00271 double dxf_arc_get_radius (DxfArc *arc); 00272 DxfArc *dxf_arc_set_radius (DxfArc *arc, double radius); 00273 double dxf_arc_get_start_angle (DxfArc *arc); 00274 DxfArc *dxf_arc_set_start_angle (DxfArc *arc, double start_angle); 00275 double dxf_arc_get_end_angle (DxfArc *arc); 00276 DxfArc *dxf_arc_set_end_angle (DxfArc *arc, double end_angle); 00277 double dxf_arc_get_length (DxfArc *arc); 00278 DxfPoint *dxf_arc_get_extrusion_vector_as_point (DxfArc *arc); 00279 double dxf_arc_get_extr_x0 (DxfArc *arc); 00280 DxfArc *dxf_arc_set_extr_x0 (DxfArc *arc, double extr_x0); 00281 double dxf_arc_get_extr_y0 (DxfArc *arc); 00282 DxfArc *dxf_arc_set_extr_y0 (DxfArc *arc, double extr_y0); 00283 double dxf_arc_get_extr_z0 (DxfArc *arc); 00284 DxfArc *dxf_arc_set_extr_z0 (DxfArc *arc, double extr_z0); 00285 DxfArc *dxf_arc_set_extrusion_vector_from_point (DxfArc *arc, DxfPoint *point); 00286 DxfArc *dxf_arc_set_extrusion_vector (DxfArc *arc, double extr_x0, double extr_y0, double extr_z0); 00287 DxfArc *dxf_arc_get_next (DxfArc *arc); 00288 DxfArc *dxf_arc_set_next (DxfArc *arc, DxfArc *next); 00289 DxfArc *dxf_arc_get_last (DxfArc *arc); 00290 00291 00292 #ifdef __cplusplus 00293 } 00294 #endif 00295 00296 00297 #endif /* LIBDXF_SRC_ARC_H */ 00298 00299 00300 /* EOF */