libDXF 0.0.1
A library with DXF related functions written in C.

circle.h

Go to the documentation of this file.
00001 
00044 #ifndef LIBDXF_SRC_CIRCLE_H
00045 #define LIBDXF_SRC_CIRCLE_H
00046 
00047 
00048 #include <math.h>
00049 #include "global.h"
00050 #include "point.h"
00051 #include "binary_graphics_data.h"
00052 
00053 
00054 #ifdef __cplusplus
00055 extern "C" {
00056 #endif
00057 
00058 
00062 typedef struct
00063 dxf_circle_struct
00064 {
00065         /* Members common for all DXF drawable entities. */
00066         int id_code;
00071         char *linetype;
00075         char *layer;
00079         double elevation;
00085         double thickness;
00089         double linetype_scale;
00093         int16_t visibility;
00101         int color;
00108         int paperspace;
00114         int graphics_data_size;
00123         int16_t shadow_mode;
00133         DxfBinaryGraphicsData *binary_graphics_data;
00139         char *dictionary_owner_soft;
00143         char *material;
00148         char *dictionary_owner_hard;
00152         int16_t lineweight;
00157         char *plot_style_name;
00161         long color_value;
00173         char *color_name;
00181         long transparency;
00189         /* Specific members for a DXF circle. */
00190         DxfPoint *p0;
00193         double radius;
00196         double extr_x0;
00200         double extr_y0;
00204         double extr_z0;
00208         struct DxfCircle *next;
00211 } DxfCircle;
00212 
00213 
00214 DxfCircle *dxf_circle_new ();
00215 DxfCircle *dxf_circle_init (DxfCircle *circle);
00216 DxfCircle *dxf_circle_read (DxfFile *fp, DxfCircle *circle);
00217 int dxf_circle_write (DxfFile *fp, DxfCircle *circle);
00218 int dxf_circle_free (DxfCircle *circle);
00219 void dxf_circle_free_chain (DxfCircle *circles);
00220 int dxf_circle_get_id_code (DxfCircle *circle);
00221 DxfCircle *dxf_circle_set_id_code (DxfCircle *circle, int id_code);
00222 char *dxf_circle_get_linetype (DxfCircle *circle);
00223 DxfCircle *dxf_circle_set_linetype (DxfCircle *circle, char *linetype);
00224 char *dxf_circle_get_layer (DxfCircle *circle);
00225 DxfCircle *dxf_circle_set_layer (DxfCircle *circle, char *layer);
00226 double dxf_circle_get_elevation (DxfCircle *circle);
00227 DxfCircle *dxf_circle_set_elevation (DxfCircle *circle, double elevation);
00228 double dxf_circle_get_thickness (DxfCircle *circle);
00229 DxfCircle *dxf_circle_set_thickness (DxfCircle *circle, double thickness);
00230 double dxf_circle_get_linetype_scale (DxfCircle *circle);
00231 DxfCircle *dxf_circle_set_linetype_scale (DxfCircle *circle, double linetype_scale);
00232 int16_t dxf_circle_get_visibility (DxfCircle *circle);
00233 DxfCircle *dxf_circle_set_visibility (DxfCircle *circle, int16_t visibility);
00234 int dxf_circle_get_color (DxfCircle *circle);
00235 DxfCircle *dxf_circle_set_color (DxfCircle *circle, int color);
00236 int dxf_circle_get_paperspace (DxfCircle *circle);
00237 DxfCircle *dxf_circle_set_paperspace (DxfCircle *circle, int paperspace);
00238 int dxf_circle_get_graphics_data_size (DxfCircle *circle);
00239 DxfCircle *dxf_circle_set_graphics_data_size (DxfCircle *circle, int graphics_data_size);
00240 int16_t dxf_circle_get_shadow_mode (DxfCircle *circle);
00241 DxfCircle *dxf_circle_set_shadow_mode (DxfCircle *circle, int16_t shadow_mode);
00242 DxfBinaryGraphicsData *dxf_circle_get_binary_graphics_data (DxfCircle *circle);
00243 DxfCircle *dxf_circle_set_binary_graphics_data (DxfCircle *circle, DxfBinaryGraphicsData *data);
00244 char *dxf_circle_get_dictionary_owner_soft (DxfCircle *circle);
00245 DxfCircle *dxf_circle_set_dictionary_owner_soft (DxfCircle *circle, char *dictionary_owner_soft);
00246 char *dxf_circle_get_material (DxfCircle *circle);
00247 DxfCircle *dxf_circle_set_material (DxfCircle *circle, char *material);
00248 char *dxf_circle_get_dictionary_owner_hard (DxfCircle *circle);
00249 DxfCircle *dxf_circle_set_dictionary_owner_hard (DxfCircle *circle, char *dictionary_owner_hard);
00250 int16_t dxf_circle_get_lineweight (DxfCircle *circle);
00251 DxfCircle *dxf_circle_set_lineweight (DxfCircle *circle, int16_t lineweight);
00252 char *dxf_circle_get_plot_style_name (DxfCircle *circle);
00253 DxfCircle *dxf_circle_set_plot_style_name (DxfCircle *circle, char *plot_style_name);
00254 long dxf_circle_get_color_value (DxfCircle *circle);
00255 DxfCircle *dxf_circle_set_color_value (DxfCircle *circle, long color_value);
00256 char *dxf_circle_get_color_name (DxfCircle *circle);
00257 DxfCircle *dxf_circle_set_color_name (DxfCircle *circle, char *color_name);
00258 long dxf_circle_get_transparency (DxfCircle *circle);
00259 DxfCircle *dxf_circle_set_transparency (DxfCircle *circle, long transparency);
00260 DxfPoint *dxf_circle_get_p0 (DxfCircle *circle);
00261 DxfCircle *dxf_circle_set_p0 (DxfCircle *circle, DxfPoint *point);
00262 double dxf_circle_get_x0 (DxfCircle *circle);
00263 DxfCircle *dxf_circle_set_x0 (DxfCircle *circle, double x0);
00264 double dxf_circle_get_y0 (DxfCircle *circle);
00265 DxfCircle *dxf_circle_set_y0 (DxfCircle *circle, double y0);
00266 double dxf_circle_get_z0 (DxfCircle *circle);
00267 DxfCircle *dxf_circle_set_z0 (DxfCircle *circle, double z0);
00268 double dxf_circle_get_radius (DxfCircle *circle);
00269 DxfCircle * dxf_circle_set_radius (DxfCircle *circle, double radius);
00270 DxfPoint *dxf_circle_get_extrusion_vector_as_point (DxfCircle *circle);
00271 DxfCircle *dxf_circle_set_extrusion_vector (DxfCircle *circle, double extr_x0, double extr_y0, double extr_z0);
00272 double dxf_circle_get_extr_x0 (DxfCircle *circle);
00273 DxfCircle *dxf_circle_set_extr_x0 (DxfCircle *circle, double extr_x0);
00274 double dxf_circle_get_extr_y0 (DxfCircle *circle);
00275 DxfCircle *dxf_circle_set_extr_y0 (DxfCircle *circle, double extr_y0);
00276 double dxf_circle_get_extr_z0 (DxfCircle *circle);
00277 DxfCircle *dxf_circle_set_extr_z0 (DxfCircle *circle, double extr_z0);
00278 double dxf_circle_get_area (DxfCircle *circle);
00279 double dxf_circle_get_circumference (DxfCircle *circle);
00280 int dxf_circle_test_point_in_circle (DxfPoint *point, DxfCircle *circle);
00281 DxfCircle *dxf_circle_get_next (DxfCircle *circle);
00282 DxfCircle *dxf_circle_set_next (DxfCircle *circle, DxfCircle *next);
00283 DxfCircle *dxf_circle_get_last (DxfCircle *circle);
00284 
00285 
00286 #ifdef __cplusplus
00287 }
00288 #endif
00289 
00290 
00291 #endif /* LIBDXF_SRC_CIRCLE_H */
00292 
00293 
00294 /* EOF */