libDXF 0.0.1
A library with DXF related functions written in C.
Data Structures | Typedefs | Functions

circle.h File Reference

Header file for a DXF circle entity (CIRCLE). More...

#include <math.h>
#include "global.h"
#include "point.h"
#include "binary_graphics_data.h"
Include dependency graph for circle.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Data Structures

struct  dxf_circle_struct
 DXF definition of a circle entity (CIRCLE). More...

Typedefs

typedef struct dxf_circle_struct DxfCircle
 DXF definition of a circle entity (CIRCLE).

Functions

DxfCircledxf_circle_new ()
 Allocate memory for a DXF CIRCLE.
DxfCircledxf_circle_init (DxfCircle *circle)
 Allocate memory and initialize data fields in a CIRCLE entity.
DxfCircledxf_circle_read (DxfFile *fp, DxfCircle *circle)
 Read data from a DXF file into a DXF CIRCLE entity.
int dxf_circle_write (DxfFile *fp, DxfCircle *circle)
 Write DXF output to file for a DXF CIRCLE entity.
int dxf_circle_free (DxfCircle *circle)
 Free the allocated memory for a DXF CIRCLE and all it's data fields.
void dxf_circle_free_chain (DxfCircle *circles)
 Free the allocated memory for a chain of DXF CIRCLE entities and all their data fields.
int dxf_circle_get_id_code (DxfCircle *circle)
 Get the ID code from a DXF CIRCLE entity.
DxfCircledxf_circle_set_id_code (DxfCircle *circle, int id_code)
 Set the ID code for a DXF CIRCLE entity.
char * dxf_circle_get_linetype (DxfCircle *circle)
 Get the linetype from a DXF CIRCLE entity.
DxfCircledxf_circle_set_linetype (DxfCircle *circle, char *linetype)
 Set the linetype for a DXF CIRCLE entity.
char * dxf_circle_get_layer (DxfCircle *circle)
 Get the layer from a DXF CIRCLE entity.
DxfCircledxf_circle_set_layer (DxfCircle *circle, char *layer)
 Set the layer for a DXF CIRCLE entity.
double dxf_circle_get_elevation (DxfCircle *circle)
 Get the elevation from a DXF CIRCLE entity.
DxfCircledxf_circle_set_elevation (DxfCircle *circle, double elevation)
 Set the elevation for a DXF CIRCLE entity.
double dxf_circle_get_thickness (DxfCircle *circle)
 Get the thickness from a DXF CIRCLE entity.
DxfCircledxf_circle_set_thickness (DxfCircle *circle, double thickness)
 Set the thickness for a DXF CIRCLE entity.
double dxf_circle_get_linetype_scale (DxfCircle *circle)
 Get the linetype scale from a DXF CIRCLE entity.
DxfCircledxf_circle_set_linetype_scale (DxfCircle *circle, double linetype_scale)
 Set the linetype scale for a DXF CIRCLE entity.
int16_t dxf_circle_get_visibility (DxfCircle *circle)
 Get the visibility from a DXF CIRCLE entity.
DxfCircledxf_circle_set_visibility (DxfCircle *circle, int16_t visibility)
 Set the visibility for a DXF CIRCLE entity.
int dxf_circle_get_color (DxfCircle *circle)
 Get the color from a DXF CIRCLE entity.
DxfCircledxf_circle_set_color (DxfCircle *circle, int color)
 Set the color for a DXF CIRCLE entity.
int dxf_circle_get_paperspace (DxfCircle *circle)
 Get the paperspace flag value from a DXF CIRCLE entity.
DxfCircledxf_circle_set_paperspace (DxfCircle *circle, int paperspace)
 Set the paperspace flag for a DXF CIRCLE entity.
int dxf_circle_get_graphics_data_size (DxfCircle *circle)
 Get the graphics_data_size value from a DXF CIRCLE entity.
DxfCircledxf_circle_set_graphics_data_size (DxfCircle *circle, int graphics_data_size)
 Set the graphics_data_size value for a DXF CIRCLE entity.
int16_t dxf_circle_get_shadow_mode (DxfCircle *circle)
 Get the shadow_mode from a DXF CIRCLE entity.
DxfCircledxf_circle_set_shadow_mode (DxfCircle *circle, int16_t shadow_mode)
 Set the shadow_mode for a DXF CIRCLE entity.
DxfBinaryGraphicsDatadxf_circle_get_binary_graphics_data (DxfCircle *circle)
 Get the pointer to the binary graphics data from a DXF CIRCLE entity.
DxfCircledxf_circle_set_binary_graphics_data (DxfCircle *circle, DxfBinaryGraphicsData *data)
 Set the pointer to the binary_graphics_data for a DXF CIRCLE entity.
char * dxf_circle_get_dictionary_owner_soft (DxfCircle *circle)
 Get the soft pointer to the dictionary owner from a DXF CIRCLE entity.
DxfCircledxf_circle_set_dictionary_owner_soft (DxfCircle *circle, char *dictionary_owner_soft)
 Set the pointer to the dictionary_owner_soft for a DXF CIRCLE entity.
char * dxf_circle_get_material (DxfCircle *circle)
 Get the pointer to the material from a DXF CIRCLE entity.
DxfCircledxf_circle_set_material (DxfCircle *circle, char *material)
 Set the pointer to the material for a DXF CIRCLE entity.
char * dxf_circle_get_dictionary_owner_hard (DxfCircle *circle)
 Get the hard pointer to the dictionary owner from a DXF CIRCLE entity.
DxfCircledxf_circle_set_dictionary_owner_hard (DxfCircle *circle, char *dictionary_owner_hard)
 Set the pointer to the dictionary_owner_hard for a DXF CIRCLE entity.
int16_t dxf_circle_get_lineweight (DxfCircle *circle)
 Get the lineweight from a DXF CIRCLE entity.
DxfCircledxf_circle_set_lineweight (DxfCircle *circle, int16_t lineweight)
 Set the lineweight for a DXF CIRCLE entity.
char * dxf_circle_get_plot_style_name (DxfCircle *circle)
 Get the plot_style_name from a DXF CIRCLE entity.
DxfCircledxf_circle_set_plot_style_name (DxfCircle *circle, char *plot_style_name)
 Set the plot_style_name for a DXF CIRCLE entity.
long dxf_circle_get_color_value (DxfCircle *circle)
 Get the color_value from a DXF CIRCLE entity.
DxfCircledxf_circle_set_color_value (DxfCircle *circle, long color_value)
 Set the color_value for a DXF CIRCLE entity.
char * dxf_circle_get_color_name (DxfCircle *circle)
 Get the color_name from a DXF CIRCLE entity.
DxfCircledxf_circle_set_color_name (DxfCircle *circle, char *color_name)
 Set the color_name for a DXF CIRCLE entity.
long dxf_circle_get_transparency (DxfCircle *circle)
 Get the transparency from a DXF CIRCLE entity.
DxfCircledxf_circle_set_transparency (DxfCircle *circle, long transparency)
 Set the transparency for a DXF CIRCLE entity.
DxfPointdxf_circle_get_p0 (DxfCircle *circle)
 Get the base point p0 of a DXF CIRCLE entity.
DxfCircledxf_circle_set_p0 (DxfCircle *circle, DxfPoint *point)
 Set the base point p0 of a DXF CIRCLE entity.
double dxf_circle_get_x0 (DxfCircle *circle)
 Get the X-value of the base point x0 of a DXF CIRCLE entity.
DxfCircledxf_circle_set_x0 (DxfCircle *circle, double x0)
 Set the X-value of the base point x0 of a DXF CIRCLE entity.
double dxf_circle_get_y0 (DxfCircle *circle)
 Get the Y-value of the base point y0 of a DXF CIRCLE entity.
DxfCircledxf_circle_set_y0 (DxfCircle *circle, double y0)
 Set the Y-value of the base point y0 of a DXF CIRCLE entity.
double dxf_circle_get_z0 (DxfCircle *circle)
 Get the Z-value of the base point z0 of a DXF CIRCLE entity.
DxfCircledxf_circle_set_z0 (DxfCircle *circle, double z0)
 Set the Z-value of the base point z0 of a DXF CIRCLE entity.
double dxf_circle_get_radius (DxfCircle *circle)
 Get the radius from a DXF CIRCLE entity.
DxfCircledxf_circle_set_radius (DxfCircle *circle, double radius)
 Set the radius for a DXF CIRCLE entity.
DxfPointdxf_circle_get_extrusion_vector_as_point (DxfCircle *circle)
 Get the extrusion vector as a DXF POINT entity from a DXF CIRCLE entity.
DxfCircledxf_circle_set_extrusion_vector (DxfCircle *circle, double extr_x0, double extr_y0, double extr_z0)
 Set the extrusion vector for a DXF CIRCLE entity.
double dxf_circle_get_extr_x0 (DxfCircle *circle)
 Get the extr_x0 from a DXF CIRCLE entity.
DxfCircledxf_circle_set_extr_x0 (DxfCircle *circle, double extr_x0)
 Set the extr_x0 for a DXF CIRCLE entity.
double dxf_circle_get_extr_y0 (DxfCircle *circle)
 Get the extr_y0 from a DXF CIRCLE entity.
DxfCircledxf_circle_set_extr_y0 (DxfCircle *circle, double extr_y0)
 Set the extr_y0 for a DXF CIRCLE entity.
double dxf_circle_get_extr_z0 (DxfCircle *circle)
 Get the extr_z0 from a DXF CIRCLE entity.
DxfCircledxf_circle_set_extr_z0 (DxfCircle *circle, double extr_z0)
 Set the extr_z0 for a DXF CIRCLE entity.
double dxf_circle_get_area (DxfCircle *circle)
 Get the area from a DXF CIRCLE entity.
double dxf_circle_get_circumference (DxfCircle *circle)
 Get the circumference from a DXF CIRCLE entity.
int dxf_circle_test_point_in_circle (DxfPoint *point, DxfCircle *circle)
 Test if a DXF POINT lies within, on top or outside a DXF CIRCLE entity.
DxfCircledxf_circle_get_next (DxfCircle *circle)
 Get the pointer to the next CIRCLE entity from a DXF CIRCLE entity.
DxfCircledxf_circle_set_next (DxfCircle *circle, DxfCircle *next)
 Set the pointer to the next CIRCLE for a DXF CIRCLE entity.
DxfCircledxf_circle_get_last (DxfCircle *circle)
 Get the pointer to the last CIRCLE entity from a linked list of DXF CIRCLE entities.

Detailed Description

Header file for a DXF circle entity (CIRCLE).

Author:
Copyright (C) 2009, 2010, 2011, 2012, 2014, 2015, 2016, 2017 by Bert Timmerman <bert.timmerman@xs4all.nl>.
Copyright (C) 2010 by Luis Matos <gass@otiliamatos.ath.cx>.
Version:
According to DXF R10.
According to DXF R11.
According to DXF R12.
According to DXF R13.
According to DXF R14.

Copyright Notices.


This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
See the GNU General Public License for more details.

You should have received a copy of the GNU General Public License along with this program; if not, write to:
Free Software Foundation, Inc.,
59 Temple Place,
Suite 330,
Boston,
MA 02111 USA.

Drawing eXchange Format (DXF) is a defacto industry standard for the exchange of drawing files between various Computer Aided Drafting programs.
DXF is an industry standard designed by Autodesk(TM).
For more details see http://www.autodesk.com.


Definition in file circle.h.


Typedef Documentation

typedef struct dxf_circle_struct DxfCircle

DXF definition of a circle entity (CIRCLE).


Function Documentation

DxfCircle* dxf_circle_new ( )

Allocate memory for a DXF CIRCLE.

Fill the memory contents with zeros.

Definition at line 53 of file circle.c.

References _, DXF_DEBUG_BEGIN, and DXF_DEBUG_END.

Referenced by dxf_circle_init(), and dxf_circle_read().

DxfCircle* dxf_circle_init ( DxfCircle circle)
DxfCircle* dxf_circle_read ( DxfFile fp,
DxfCircle circle 
)

Read data from a DXF file into a DXF CIRCLE entity.

The last line read from file contained the string "CIRCLE".
Now follows some data for the CIRCLE, to be terminated with a " 0" string announcing the following entity, or the end of the ENTITY section marker ENDSEC.
While parsing the DXF file store data in circle.

Returns:
a pointer to circle.
Parameters:
fpDXF file pointer to an input file (or device).
circleDXF circle entity.

Definition at line 162 of file circle.c.

References _, dxf_file_struct::acad_version_number, AutoCAD_11, AutoCAD_13, dxf_circle_struct::color, dxf_circle_struct::dictionary_owner_hard, dxf_circle_struct::dictionary_owner_soft, dxf_circle_get_layer(), dxf_circle_get_linetype(), dxf_circle_init(), dxf_circle_new(), dxf_circle_set_layer(), dxf_circle_set_linetype(), DXF_DEBUG_BEGIN, DXF_DEBUG_END, DXF_DEFAULT_LAYER, DXF_DEFAULT_LINETYPE, dxf_circle_struct::elevation, dxf_circle_struct::extr_x0, dxf_circle_struct::extr_y0, dxf_circle_struct::extr_z0, dxf_file_struct::filename, dxf_file_struct::fp, dxf_circle_struct::id_code, dxf_circle_struct::layer, dxf_file_struct::line_number, dxf_circle_struct::linetype, dxf_circle_struct::linetype_scale, dxf_circle_struct::p0, dxf_circle_struct::paperspace, dxf_circle_struct::radius, dxf_circle_struct::thickness, dxf_circle_struct::visibility, dxf_point_struct::x0, dxf_point_struct::y0, and dxf_point_struct::z0.

Here is the call graph for this function:

int dxf_circle_write ( DxfFile fp,
DxfCircle circle 
)

Write DXF output to file for a DXF CIRCLE entity.

Todo:
for version R14.
Implementing the start of application-defined group "{application_name", with Group code 102.
For example: "{ACAD_REACTORS" indicates the start of the AutoCAD persistent reactors group.

application-defined codes: Group codes and values within the 102 groups are application defined (optional).

End of group, "}" (optional), with Group code 102.

Parameters:
fpDXF file pointer to an output file (or device).
circleDXF circle entity.

Definition at line 385 of file circle.c.

References _, dxf_file_struct::acad_version_number, AutoCAD_11, AutoCAD_12, AutoCAD_13, AutoCAD_14, dxf_circle_get_color(), dxf_circle_get_dictionary_owner_hard(), dxf_circle_get_dictionary_owner_soft(), dxf_circle_get_elevation(), dxf_circle_get_id_code(), dxf_circle_get_layer(), dxf_circle_get_linetype(), dxf_circle_get_linetype_scale(), dxf_circle_get_paperspace(), dxf_circle_get_radius(), dxf_circle_get_thickness(), dxf_circle_get_visibility(), dxf_circle_get_x0(), dxf_circle_get_y0(), dxf_circle_get_z0(), dxf_circle_set_layer(), dxf_circle_set_linetype(), DXF_COLOR_BYLAYER, DXF_DEBUG_BEGIN, DXF_DEBUG_END, DXF_DEFAULT_LAYER, DXF_DEFAULT_LINETYPE, DXF_FLATLAND, DXF_PAPERSPACE, dxf_circle_struct::extr_x0, dxf_circle_struct::extr_y0, dxf_circle_struct::extr_z0, and dxf_file_struct::fp.

Here is the call graph for this function:

int dxf_circle_free ( DxfCircle circle)

Free the allocated memory for a DXF CIRCLE and all it's data fields.

Returns:
EXIT_SUCCESS when done, or EXIT_FAILURE when an error occurred.
Parameters:
circlePointer to the memory occupied by the DXF CIRCLE entity.

Definition at line 545 of file circle.c.

References _, dxf_circle_struct::dictionary_owner_hard, dxf_circle_struct::dictionary_owner_soft, DXF_DEBUG_BEGIN, DXF_DEBUG_END, dxf_circle_struct::layer, dxf_circle_struct::linetype, and dxf_circle_struct::next.

Referenced by dxf_circle_free_chain().

void dxf_circle_free_chain ( DxfCircle circles)

Free the allocated memory for a chain of DXF CIRCLE entities and all their data fields.

Parameters:
circlespointer to the chain of DXF CIRCLE entities.

Definition at line 587 of file circle.c.

References _, dxf_circle_free(), DXF_DEBUG_BEGIN, DXF_DEBUG_END, and dxf_circle_struct::next.

Here is the call graph for this function:

int dxf_circle_get_id_code ( DxfCircle circle)

Get the ID code from a DXF CIRCLE entity.

Returns:
ID code.
Parameters:
circlea pointer to a DXF CIRCLE entity.

Definition at line 620 of file circle.c.

References _, DXF_DEBUG_BEGIN, DXF_DEBUG_END, and dxf_circle_struct::id_code.

Referenced by dxf_circle_write().

DxfCircle* dxf_circle_set_id_code ( DxfCircle circle,
int  id_code 
)

Set the ID code for a DXF CIRCLE entity.

Parameters:
circlea pointer to a DXF CIRCLE entity.
id_codeIdentification number for the entity.
This is to be an unique (sequential) number in the DXF file.

Definition at line 655 of file circle.c.

References _, DXF_DEBUG_BEGIN, DXF_DEBUG_END, and dxf_circle_struct::id_code.

Referenced by dxf_circle_init().

char* dxf_circle_get_linetype ( DxfCircle circle)

Get the linetype from a DXF CIRCLE entity.

Returns:
linetype when sucessful, NULL when an error occurred.
Parameters:
circlea pointer to a DXF CIRCLE entity.

Definition at line 697 of file circle.c.

References _, DXF_DEBUG_BEGIN, DXF_DEBUG_END, and dxf_circle_struct::linetype.

Referenced by dxf_circle_read(), and dxf_circle_write().

DxfCircle* dxf_circle_set_linetype ( DxfCircle circle,
char *  linetype 
)

Set the linetype for a DXF CIRCLE entity.

Parameters:
circlea pointer to a DXF CIRCLE entity.
linetypea string containing the linetype for the entity.

Definition at line 732 of file circle.c.

References _, DXF_DEBUG_BEGIN, DXF_DEBUG_END, and dxf_circle_struct::linetype.

Referenced by dxf_circle_init(), dxf_circle_read(), and dxf_circle_write().

char* dxf_circle_get_layer ( DxfCircle circle)

Get the layer from a DXF CIRCLE entity.

Returns:
layer when sucessful, NULL when an error occurred.
Parameters:
circlea pointer to a DXF CIRCLE entity.

Definition at line 772 of file circle.c.

References _, DXF_DEBUG_BEGIN, DXF_DEBUG_END, and dxf_circle_struct::layer.

Referenced by dxf_circle_read(), and dxf_circle_write().

DxfCircle* dxf_circle_set_layer ( DxfCircle circle,
char *  layer 
)

Set the layer for a DXF CIRCLE entity.

Parameters:
circlea pointer to a DXF CIRCLE entity.
layera string containing the layer for the entity.

Definition at line 807 of file circle.c.

References _, DXF_DEBUG_BEGIN, DXF_DEBUG_END, and dxf_circle_struct::layer.

Referenced by dxf_circle_init(), dxf_circle_read(), and dxf_circle_write().

double dxf_circle_get_elevation ( DxfCircle circle)

Get the elevation from a DXF CIRCLE entity.

Returns:
elevation.
Parameters:
circlea pointer to a DXF CIRCLE entity.

Definition at line 847 of file circle.c.

References _, DXF_DEBUG_BEGIN, DXF_DEBUG_END, and dxf_circle_struct::elevation.

Referenced by dxf_circle_write().

DxfCircle* dxf_circle_set_elevation ( DxfCircle circle,
double  elevation 
)

Set the elevation for a DXF CIRCLE entity.

Parameters:
circlea pointer to a DXF CIRCLE entity.
elevationthe elevation to be set for the entity.

Definition at line 875 of file circle.c.

References _, DXF_DEBUG_BEGIN, DXF_DEBUG_END, and dxf_circle_struct::elevation.

Referenced by dxf_circle_init().

double dxf_circle_get_thickness ( DxfCircle circle)

Get the thickness from a DXF CIRCLE entity.

Returns:
thickness.
Parameters:
circlea pointer to a DXF CIRCLE entity.

Definition at line 908 of file circle.c.

References _, DXF_DEBUG_BEGIN, DXF_DEBUG_END, and dxf_circle_struct::thickness.

Referenced by dxf_circle_write().

DxfCircle* dxf_circle_set_thickness ( DxfCircle circle,
double  thickness 
)

Set the thickness for a DXF CIRCLE entity.

Parameters:
circlea pointer to a DXF CIRCLE entity.
thicknessthe thickness to be set for the entity.

Definition at line 943 of file circle.c.

References _, DXF_DEBUG_BEGIN, DXF_DEBUG_END, and dxf_circle_struct::thickness.

Referenced by dxf_circle_init().

double dxf_circle_get_linetype_scale ( DxfCircle circle)

Get the linetype scale from a DXF CIRCLE entity.

Returns:
linetype scale.
Parameters:
circlea pointer to a DXF CIRCLE entity.

Definition at line 983 of file circle.c.

References _, DXF_DEBUG_BEGIN, DXF_DEBUG_END, and dxf_circle_struct::linetype_scale.

Referenced by dxf_circle_write().

DxfCircle* dxf_circle_set_linetype_scale ( DxfCircle circle,
double  linetype_scale 
)

Set the linetype scale for a DXF CIRCLE entity.

Parameters:
circlea pointer to a DXF CIRCLE entity.
linetype_scalethe linetype scale to be set for the entity.

Definition at line 1018 of file circle.c.

References _, DXF_DEBUG_BEGIN, DXF_DEBUG_END, and dxf_circle_struct::linetype_scale.

Referenced by dxf_circle_init().

int16_t dxf_circle_get_visibility ( DxfCircle circle)

Get the visibility from a DXF CIRCLE entity.

Returns:
visibility.
Parameters:
circlea pointer to a DXF CIRCLE entity.

Definition at line 1058 of file circle.c.

References _, DXF_DEBUG_BEGIN, DXF_DEBUG_END, and dxf_circle_struct::visibility.

Referenced by dxf_circle_write().

DxfCircle* dxf_circle_set_visibility ( DxfCircle circle,
int16_t  visibility 
)

Set the visibility for a DXF CIRCLE entity.

Parameters:
circlea pointer to a DXF CIRCLE entity.
visibilitythe visibility to be set for the entity.

Definition at line 1100 of file circle.c.

References _, DXF_DEBUG_BEGIN, DXF_DEBUG_END, and dxf_circle_struct::visibility.

Referenced by dxf_circle_init().

int dxf_circle_get_color ( DxfCircle circle)

Get the color from a DXF CIRCLE entity.

Returns:
color.
Parameters:
circlea pointer to a DXF CIRCLE entity.

Definition at line 1147 of file circle.c.

References _, dxf_circle_struct::color, DXF_DEBUG_BEGIN, and DXF_DEBUG_END.

Referenced by dxf_circle_write().

DxfCircle* dxf_circle_set_color ( DxfCircle circle,
int  color 
)

Set the color for a DXF CIRCLE entity.

Parameters:
circlea pointer to a DXF CIRCLE entity.
colorthe color to be set for the entity.

Definition at line 1181 of file circle.c.

References _, dxf_circle_struct::color, DXF_DEBUG_BEGIN, and DXF_DEBUG_END.

Referenced by dxf_circle_init().

int dxf_circle_get_paperspace ( DxfCircle circle)

Get the paperspace flag value from a DXF CIRCLE entity.

Returns:
paperspace flag value.
Parameters:
circlea pointer to a DXF CIRCLE entity.

Definition at line 1222 of file circle.c.

References _, DXF_DEBUG_BEGIN, DXF_DEBUG_END, and dxf_circle_struct::paperspace.

Referenced by dxf_circle_write().

DxfCircle* dxf_circle_set_paperspace ( DxfCircle circle,
int  paperspace 
)

Set the paperspace flag for a DXF CIRCLE entity.

Parameters:
circlea pointer to a DXF CIRCLE entity.
paperspacethe paperspace flag value to be set for the entity.

Definition at line 1262 of file circle.c.

References _, DXF_DEBUG_BEGIN, DXF_DEBUG_END, and dxf_circle_struct::paperspace.

Referenced by dxf_circle_init().

int dxf_circle_get_graphics_data_size ( DxfCircle circle)

Get the graphics_data_size value from a DXF CIRCLE entity.

Returns:
graphics_data_size value when successful, or EXIT_FAILURE when an error occurred.
Parameters:
circlea pointer to a DXF CIRCLE entity.

Definition at line 1311 of file circle.c.

References _, DXF_DEBUG_BEGIN, DXF_DEBUG_END, and dxf_circle_struct::graphics_data_size.

DxfCircle* dxf_circle_set_graphics_data_size ( DxfCircle circle,
int  graphics_data_size 
)

Set the graphics_data_size value for a DXF CIRCLE entity.

Returns:
a pointer to circle when successful, or NULL when an error occurred.
Parameters:
circlea pointer to a DXF CIRCLE entity.
graphics_data_sizethe graphics_data_size value to be set for the entity.

Definition at line 1354 of file circle.c.

References _, DXF_DEBUG_BEGIN, DXF_DEBUG_END, and dxf_circle_struct::graphics_data_size.

Referenced by dxf_circle_init().

int16_t dxf_circle_get_shadow_mode ( DxfCircle circle)

Get the shadow_mode from a DXF CIRCLE entity.

Returns:
shadow_mode when successful, or EXIT_FAILURE when an error occurred.
Parameters:
circlea pointer to a DXF CIRCLE entity.

Definition at line 1403 of file circle.c.

References _, DXF_DEBUG_BEGIN, DXF_DEBUG_END, and dxf_circle_struct::shadow_mode.

DxfCircle* dxf_circle_set_shadow_mode ( DxfCircle circle,
int16_t  shadow_mode 
)

Set the shadow_mode for a DXF CIRCLE entity.

Returns:
a pointer to circle when successful, or NULL when an error occurred.
Parameters:
circlea pointer to a DXF CIRCLE entity.
shadow_modethe shadow mode to be set for the entity.

Definition at line 1448 of file circle.c.

References _, DXF_DEBUG_BEGIN, DXF_DEBUG_END, and dxf_circle_struct::shadow_mode.

Referenced by dxf_circle_init().

DxfBinaryGraphicsData* dxf_circle_get_binary_graphics_data ( DxfCircle circle)

Get the pointer to the binary graphics data from a DXF CIRCLE entity.

Returns:
pointer to the binary graphics data.
Warning:
No checks are performed on the returned pointer.
Parameters:
circlea pointer to a DXF CIRCLE entity.

Definition at line 1498 of file circle.c.

References _, dxf_circle_struct::binary_graphics_data, DXF_DEBUG_BEGIN, and DXF_DEBUG_END.

Referenced by dxf_circle_init().

DxfCircle* dxf_circle_set_binary_graphics_data ( DxfCircle circle,
DxfBinaryGraphicsData data 
)

Set the pointer to the binary_graphics_data for a DXF CIRCLE entity.

Returns:
a pointer to circle when successful, or NULL when an error occurred.
Parameters:
circlea pointer to a DXF CIRCLE entity.
dataa string containing the pointer to the binary_graphics_data for the entity.

Definition at line 1537 of file circle.c.

References _, dxf_circle_struct::binary_graphics_data, DXF_DEBUG_BEGIN, and DXF_DEBUG_END.

Referenced by dxf_circle_init().

char* dxf_circle_get_dictionary_owner_soft ( DxfCircle circle)

Get the soft pointer to the dictionary owner from a DXF CIRCLE entity.

Returns:
soft pointer to the dictionary owner.
Warning:
No checks are performed on the returned pointer (string).
Parameters:
circlea pointer to a DXF CIRCLE entity.

Definition at line 1581 of file circle.c.

References _, dxf_circle_struct::dictionary_owner_soft, DXF_DEBUG_BEGIN, and DXF_DEBUG_END.

Referenced by dxf_circle_write().

DxfCircle* dxf_circle_set_dictionary_owner_soft ( DxfCircle circle,
char *  dictionary_owner_soft 
)

Set the pointer to the dictionary_owner_soft for a DXF CIRCLE entity.

Parameters:
circlea pointer to a DXF CIRCLE entity.
dictionary_owner_softa string containing the pointer to the dictionary_owner_soft for the entity.

Definition at line 1617 of file circle.c.

References _, dxf_circle_struct::dictionary_owner_soft, DXF_DEBUG_BEGIN, and DXF_DEBUG_END.

Referenced by dxf_circle_init().

char* dxf_circle_get_material ( DxfCircle circle)

Get the pointer to the material from a DXF CIRCLE entity.

Returns:
a pointer to material when successful, or NULL when an error occurred.
Warning:
No checks are performed on the returned pointer.
Parameters:
circlea pointer to a DXF CIRCLE entity.

Definition at line 1662 of file circle.c.

References _, DXF_DEBUG_BEGIN, DXF_DEBUG_END, and dxf_circle_struct::material.

DxfCircle* dxf_circle_set_material ( DxfCircle circle,
char *  material 
)

Set the pointer to the material for a DXF CIRCLE entity.

Returns:
a pointer to circle when successful, or NULL when an error occurred.
Parameters:
circlea pointer to a DXF CIRCLE entity.
materiala string containing the pointer to the material for the entity.

Definition at line 1700 of file circle.c.

References _, DXF_DEBUG_BEGIN, DXF_DEBUG_END, and dxf_circle_struct::material.

Referenced by dxf_circle_init().

char* dxf_circle_get_dictionary_owner_hard ( DxfCircle circle)

Get the hard pointer to the dictionary owner from a DXF CIRCLE entity.

Returns:
hard pointer to the dictionary owner.
Warning:
No checks are performed on the returned pointer (string).
Parameters:
circlea pointer to a DXF CIRCLE entity.

Definition at line 1744 of file circle.c.

References _, dxf_circle_struct::dictionary_owner_hard, DXF_DEBUG_BEGIN, and DXF_DEBUG_END.

Referenced by dxf_circle_write().

DxfCircle* dxf_circle_set_dictionary_owner_hard ( DxfCircle circle,
char *  dictionary_owner_hard 
)

Set the pointer to the dictionary_owner_hard for a DXF CIRCLE entity.

Parameters:
circlea pointer to a DXF CIRCLE entity.
dictionary_owner_harda string containing the pointer to the dictionary_owner_hard for the entity.

Definition at line 1780 of file circle.c.

References _, dxf_circle_struct::dictionary_owner_hard, DXF_DEBUG_BEGIN, and DXF_DEBUG_END.

Referenced by dxf_circle_init().

int16_t dxf_circle_get_lineweight ( DxfCircle circle)

Get the lineweight from a DXF CIRCLE entity.

Returns:
lineweight when successful, or EXIT_FAILURE when an error occurred.
Parameters:
circlea pointer to a DXF CIRCLE entity.

Definition at line 1822 of file circle.c.

References _, DXF_DEBUG_BEGIN, DXF_DEBUG_END, and dxf_circle_struct::lineweight.

DxfCircle* dxf_circle_set_lineweight ( DxfCircle circle,
int16_t  lineweight 
)

Set the lineweight for a DXF CIRCLE entity.

Returns:
a pointer to circle when successful, or NULL when an error occurred.
Parameters:
circlea pointer to a DXF CIRCLE entity.
lineweightthe lineweight to be set for the entity.

Definition at line 1853 of file circle.c.

References _, DXF_DEBUG_BEGIN, DXF_DEBUG_END, and dxf_circle_struct::lineweight.

Referenced by dxf_circle_init().

char* dxf_circle_get_plot_style_name ( DxfCircle circle)

Get the plot_style_name from a DXF CIRCLE entity.

Returns:
plot_style_name when sucessful, or NULL when an error occurred.
Parameters:
circlea pointer to a DXF CIRCLE entity.

Definition at line 1887 of file circle.c.

References _, DXF_DEBUG_BEGIN, DXF_DEBUG_END, and dxf_circle_struct::plot_style_name.

DxfCircle* dxf_circle_set_plot_style_name ( DxfCircle circle,
char *  plot_style_name 
)

Set the plot_style_name for a DXF CIRCLE entity.

Returns:
a pointer to circle when successful, or NULL when an error occurred.
Parameters:
circlea pointer to a DXF CIRCLE entity.
plot_style_namea string containing the plot_style_name for the entity.

Definition at line 1925 of file circle.c.

References _, DXF_DEBUG_BEGIN, DXF_DEBUG_END, and dxf_circle_struct::plot_style_name.

Referenced by dxf_circle_init().

long dxf_circle_get_color_value ( DxfCircle circle)

Get the color_value from a DXF CIRCLE entity.

Returns:
color_value when successful, or EXIT_FAILURE when an error occurred.
Parameters:
circlea pointer to a DXF CIRCLE entity.

Definition at line 1967 of file circle.c.

References _, dxf_circle_struct::color_value, DXF_DEBUG_BEGIN, and DXF_DEBUG_END.

DxfCircle* dxf_circle_set_color_value ( DxfCircle circle,
long  color_value 
)

Set the color_value for a DXF CIRCLE entity.

Returns:
a pointer to circle when successful, or NULL when an error occurred.
Parameters:
circlea pointer to a DXF CIRCLE entity.
color_valuethe color_value to be set for the entity.

Definition at line 1998 of file circle.c.

References _, dxf_circle_struct::color_value, DXF_DEBUG_BEGIN, and DXF_DEBUG_END.

Referenced by dxf_circle_init().

char* dxf_circle_get_color_name ( DxfCircle circle)

Get the color_name from a DXF CIRCLE entity.

Returns:
color_name when sucessful, or NULL when an error occurred.
Parameters:
circlea pointer to a DXF CIRCLE entity.

Definition at line 2032 of file circle.c.

References _, dxf_circle_struct::color_name, DXF_DEBUG_BEGIN, and DXF_DEBUG_END.

DxfCircle* dxf_circle_set_color_name ( DxfCircle circle,
char *  color_name 
)

Set the color_name for a DXF CIRCLE entity.

Returns:
a pointer to circle when successful, or NULL when an error occurred.
Parameters:
circlea pointer to a DXF CIRCLE entity.
color_namea string containing the color_name for the entity.

Definition at line 2070 of file circle.c.

References _, dxf_circle_struct::color_name, DXF_DEBUG_BEGIN, and DXF_DEBUG_END.

Referenced by dxf_circle_init().

long dxf_circle_get_transparency ( DxfCircle circle)

Get the transparency from a DXF CIRCLE entity.

Returns:
transparency when successful, or EXIT_FAILURE when an error occurred.
Parameters:
circlea pointer to a DXF CIRCLE entity.

Definition at line 2112 of file circle.c.

References _, DXF_DEBUG_BEGIN, DXF_DEBUG_END, and dxf_circle_struct::transparency.

DxfCircle* dxf_circle_set_transparency ( DxfCircle circle,
long  transparency 
)

Set the transparency for a DXF CIRCLE entity.

Returns:
a pointer to circle when successful, or NULL when an error occurred.
Parameters:
circlea pointer to a DXF CIRCLE entity.
transparencythe transparency to be set for the entity.

Definition at line 2143 of file circle.c.

References _, DXF_DEBUG_BEGIN, DXF_DEBUG_END, and dxf_circle_struct::transparency.

Referenced by dxf_circle_init().

DxfPoint* dxf_circle_get_p0 ( DxfCircle circle)

Get the base point p0 of a DXF CIRCLE entity.

Returns:
the base point.
Parameters:
circlea pointer to a DXF CIRCLE entity.

Definition at line 2176 of file circle.c.

References _, DXF_DEBUG_BEGIN, DXF_DEBUG_END, and dxf_circle_struct::p0.

Referenced by dxf_circle_init().

DxfCircle* dxf_circle_set_p0 ( DxfCircle circle,
DxfPoint point 
)

Set the base point p0 of a DXF CIRCLE entity.

Returns:
a pointer to a DXF CIRCLE entity.
Parameters:
circlea pointer to a DXF CIRCLE entity.
pointa pointer to a DXF POINT entity.

Definition at line 2213 of file circle.c.

References _, DXF_DEBUG_BEGIN, DXF_DEBUG_END, and dxf_circle_struct::p0.

Referenced by dxf_circle_init().

double dxf_circle_get_x0 ( DxfCircle circle)

Get the X-value of the base point x0 of a DXF CIRCLE entity.

Returns:
the X-value of the base point x0.
Parameters:
circlea pointer to a DXF CIRCLE entity.

Definition at line 2254 of file circle.c.

References _, DXF_DEBUG_BEGIN, DXF_DEBUG_END, dxf_circle_struct::p0, and dxf_point_struct::x0.

Referenced by dxf_circle_write().

DxfCircle* dxf_circle_set_x0 ( DxfCircle circle,
double  x0 
)

Set the X-value of the base point x0 of a DXF CIRCLE entity.

Returns:
a pointer to circle when successful, or NULL when an error occurred.
Parameters:
circlea pointer to a DXF CIRCLE entity.
x0the X-value of the base point x0 of a DXF CIRCLE entity.

Definition at line 2294 of file circle.c.

References _, DXF_DEBUG_BEGIN, DXF_DEBUG_END, dxf_circle_struct::p0, and dxf_point_struct::x0.

double dxf_circle_get_y0 ( DxfCircle circle)

Get the Y-value of the base point y0 of a DXF CIRCLE entity.

Returns:
the Y-value of the base point y0.
Parameters:
circlea pointer to a DXF CIRCLE entity.

Definition at line 2336 of file circle.c.

References _, DXF_DEBUG_BEGIN, DXF_DEBUG_END, dxf_circle_struct::p0, and dxf_point_struct::y0.

Referenced by dxf_circle_write().

DxfCircle* dxf_circle_set_y0 ( DxfCircle circle,
double  y0 
)

Set the Y-value of the base point y0 of a DXF CIRCLE entity.

Returns:
a pointer to circle when successful, or NULL when an error occurred.
Parameters:
circlea pointer to a DXF CIRCLE entity.
y0the Y-value of the base point y0 of a DXF CIRCLE entity.

Definition at line 2376 of file circle.c.

References _, DXF_DEBUG_BEGIN, DXF_DEBUG_END, dxf_circle_struct::p0, and dxf_point_struct::y0.

double dxf_circle_get_z0 ( DxfCircle circle)

Get the Z-value of the base point z0 of a DXF CIRCLE entity.

Returns:
the Z-value of the base point z0.
Parameters:
circlea pointer to a DXF CIRCLE entity.

Definition at line 2418 of file circle.c.

References _, DXF_DEBUG_BEGIN, DXF_DEBUG_END, dxf_circle_struct::p0, and dxf_point_struct::z0.

Referenced by dxf_circle_write().

DxfCircle* dxf_circle_set_z0 ( DxfCircle circle,
double  z0 
)

Set the Z-value of the base point z0 of a DXF CIRCLE entity.

Returns:
a pointer to circle when successful, or NULL when an error occurred.
Parameters:
circlea pointer to a DXF CIRCLE entity.
z0the Z-value of the base point z0 of a DXF CIRCLE entity.

Definition at line 2458 of file circle.c.

References _, DXF_DEBUG_BEGIN, DXF_DEBUG_END, dxf_circle_struct::p0, and dxf_point_struct::z0.

double dxf_circle_get_radius ( DxfCircle circle)

Get the radius from a DXF CIRCLE entity.

Returns:
radius.
Parameters:
circlea pointer to a DXF CIRCLE entity.

Definition at line 2499 of file circle.c.

References _, DXF_DEBUG_BEGIN, DXF_DEBUG_END, and dxf_circle_struct::radius.

Referenced by dxf_circle_write().

DxfCircle* dxf_circle_set_radius ( DxfCircle circle,
double  radius 
)

Set the radius for a DXF CIRCLE entity.

Parameters:
circlea pointer to a DXF CIRCLE entity.
radiusthe radius to be set for the entity.

Definition at line 2541 of file circle.c.

References _, DXF_DEBUG_BEGIN, DXF_DEBUG_END, and dxf_circle_struct::radius.

Referenced by dxf_circle_init().

DxfPoint* dxf_circle_get_extrusion_vector_as_point ( DxfCircle circle)

Get the extrusion vector as a DXF POINT entity from a DXF CIRCLE entity.

Returns:
a DXF POINT containing the extrusion coordinates.
Warning:
No other members are copied into the DXF POINT.
Parameters:
circlea pointer to a DXF CIRCLE entity.

Definition at line 2591 of file circle.c.

References _, DXF_DEBUG_BEGIN, DXF_DEBUG_END, dxf_point_init(), dxf_circle_struct::extr_x0, dxf_circle_struct::extr_y0, and dxf_circle_struct::extr_z0.

Here is the call graph for this function:

DxfCircle* dxf_circle_set_extrusion_vector ( DxfCircle circle,
double  extr_x0,
double  extr_y0,
double  extr_z0 
)

Set the extrusion vector for a DXF CIRCLE entity.

Parameters:
circlea pointer to a DXF CIRCLE entity.
extr_x0X-value of the extrusion direction.
extr_y0Y-value of the extrusion direction.
extr_z0Z-value of the extrusion direction.

Definition at line 2632 of file circle.c.

References _, DXF_DEBUG_BEGIN, DXF_DEBUG_END, dxf_circle_struct::extr_x0, dxf_circle_struct::extr_y0, and dxf_circle_struct::extr_z0.

double dxf_circle_get_extr_x0 ( DxfCircle circle)

Get the extr_x0 from a DXF CIRCLE entity.

Returns:
extr_xo.
Parameters:
circlea pointer to a DXF CIRCLE entity.

Definition at line 2671 of file circle.c.

References _, DXF_DEBUG_BEGIN, DXF_DEBUG_END, and dxf_circle_struct::extr_x0.

DxfCircle* dxf_circle_set_extr_x0 ( DxfCircle circle,
double  extr_x0 
)

Set the extr_x0 for a DXF CIRCLE entity.

Parameters:
circlea pointer to a DXF CIRCLE entity.
extr_x0the extr_x0 to be set for the entity.

Definition at line 2699 of file circle.c.

References _, DXF_DEBUG_BEGIN, DXF_DEBUG_END, and dxf_circle_struct::extr_x0.

Referenced by dxf_circle_init().

double dxf_circle_get_extr_y0 ( DxfCircle circle)

Get the extr_y0 from a DXF CIRCLE entity.

Returns:
extr_xo.
Parameters:
circlea pointer to a DXF CIRCLE entity.

Definition at line 2732 of file circle.c.

References _, DXF_DEBUG_BEGIN, DXF_DEBUG_END, and dxf_circle_struct::extr_y0.

DxfCircle* dxf_circle_set_extr_y0 ( DxfCircle circle,
double  extr_y0 
)

Set the extr_y0 for a DXF CIRCLE entity.

Parameters:
circlea pointer to a DXF CIRCLE entity.
extr_y0the extr_y0 to be set for the entity.

Definition at line 2760 of file circle.c.

References _, DXF_DEBUG_BEGIN, DXF_DEBUG_END, and dxf_circle_struct::extr_y0.

Referenced by dxf_circle_init().

double dxf_circle_get_extr_z0 ( DxfCircle circle)

Get the extr_z0 from a DXF CIRCLE entity.

Returns:
extr_zo.
Parameters:
circlea pointer to a DXF CIRCLE entity.

Definition at line 2793 of file circle.c.

References _, DXF_DEBUG_BEGIN, DXF_DEBUG_END, and dxf_circle_struct::extr_z0.

DxfCircle* dxf_circle_set_extr_z0 ( DxfCircle circle,
double  extr_z0 
)

Set the extr_z0 for a DXF CIRCLE entity.

Parameters:
circlea pointer to a DXF CIRCLE entity.
extr_z0the extr_z0 to be set for the entity.

Definition at line 2821 of file circle.c.

References _, DXF_DEBUG_BEGIN, DXF_DEBUG_END, and dxf_circle_struct::extr_z0.

Referenced by dxf_circle_init().

double dxf_circle_get_area ( DxfCircle circle)

Get the area from a DXF CIRCLE entity.

Returns:
area.
Parameters:
circlea pointer to a DXF CIRCLE entity.

Definition at line 2854 of file circle.c.

References _, DXF_DEBUG_BEGIN, DXF_DEBUG_END, and dxf_circle_struct::radius.

double dxf_circle_get_circumference ( DxfCircle circle)

Get the circumference from a DXF CIRCLE entity.

Returns:
circumference.
Parameters:
circlea pointer to a DXF CIRCLE entity.

Definition at line 2898 of file circle.c.

References _, DXF_DEBUG_BEGIN, DXF_DEBUG_END, and dxf_circle_struct::radius.

int dxf_circle_test_point_in_circle ( DxfPoint point,
DxfCircle circle 
)

Test if a DXF POINT lies within, on top or outside a DXF CIRCLE entity.

Returns:
INSIDE if the point lies inside the circle, OUTSIDE if the point lies outside the circle, ON_EDGE if the point lies on top the circle.
Note:
A two-dimensional circle on a plane wit z = 0.0.
Parameters:
pointa pointer to a DXF POINT entity.
circlea pointer to a DXF CIRCLE entity.

Definition at line 2947 of file circle.c.

References _, DXF_DEBUG_BEGIN, DXF_DEBUG_END, INSIDE, ON_EDGE, OUTSIDE, dxf_circle_struct::p0, dxf_circle_struct::radius, dxf_point_struct::x0, and dxf_point_struct::y0.

DxfCircle* dxf_circle_get_next ( DxfCircle circle)

Get the pointer to the next CIRCLE entity from a DXF CIRCLE entity.

Returns:
pointer to the next CIRCLE entity.
Warning:
No checks are performed on the returned pointer.
Parameters:
circlea pointer to a DXF CIRCLE entity.

Definition at line 3011 of file circle.c.

References _, DXF_DEBUG_BEGIN, DXF_DEBUG_END, and dxf_circle_struct::next.

DxfCircle* dxf_circle_set_next ( DxfCircle circle,
DxfCircle next 
)

Set the pointer to the next CIRCLE for a DXF CIRCLE entity.

Parameters:
circlea pointer to a DXF CIRCLE entity.
nexta pointer to the next CIRCLE for the entity.

Definition at line 3047 of file circle.c.

References _, DXF_DEBUG_BEGIN, DXF_DEBUG_END, and dxf_circle_struct::next.

Referenced by dxf_circle_init().

DxfCircle* dxf_circle_get_last ( DxfCircle circle)

Get the pointer to the last CIRCLE entity from a linked list of DXF CIRCLE entities.

Returns:
pointer to the last CIRCLE entity.
Warning:
No checks are performed on the returned pointer.
Parameters:
circlea pointer to a DXF CIRCLE entity.

Definition at line 3090 of file circle.c.

References _, DXF_DEBUG_BEGIN, DXF_DEBUG_END, and dxf_circle_struct::next.