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

donut.h File Reference

Header file for a libDXF donut entity. More...

#include "global.h"
#include "point.h"
#include "binary_graphics_data.h"
#include "polyline.h"
#include "vertex.h"
#include "seqend.h"
Include dependency graph for donut.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Data Structures

struct  dxf_donut_struct
 Definition of a libDXF donut entity. More...

Typedefs

typedef struct dxf_donut_struct DxfDonut
 Definition of a libDXF donut entity.

Functions

DxfDonutdxf_donut_new ()
 Allocate memory for a libDXF donut.
DxfDonutdxf_donut_init (DxfDonut *donut)
 Allocate memory and initialize data fields in a libDXF donut entity.
int dxf_donut_write (DxfFile *fp, DxfDonut *donut)
 Write DXF output to a file for a libDXF donut.
int dxf_donut_free (DxfDonut *donut)
 Free the allocated memory for a libDXF donut and all it's data fields.
void dxf_donut_free_chain (DxfDonut *donuts)
 Free the allocated memory for a chain of DXF donut entities and all their data fields.
int dxf_donut_get_id_code (DxfDonut *donut)
 Get the id_code from a libDXF donut entity.
DxfDonutdxf_donut_set_id_code (DxfDonut *donut, int id_code)
 Set the id_code for a libDXF donut entity.
char * dxf_donut_get_linetype (DxfDonut *donut)
 Get the linetype from a libDXF donut entity.
DxfDonutdxf_donut_set_linetype (DxfDonut *donut, char *linetype)
 Set the linetype for a libDXF donut entity.
char * dxf_donut_get_layer (DxfDonut *donut)
 Get the layer from a libDXF donut entity.
DxfDonutdxf_donut_set_layer (DxfDonut *donut, char *layer)
 Set the layer for a libDXF donut entity.
double dxf_donut_get_elevation (DxfDonut *donut)
 Get the elevation a this libDXF donut entity.
DxfDonutdxf_donut_set_elevation (DxfDonut *donut, double elevation)
 Set the elevation for a libDXF donut entity.
double dxf_donut_get_thickness (DxfDonut *donut)
 Get the thickness from a libDXF donut entity.
DxfDonutdxf_donut_set_thickness (DxfDonut *donut, double thickness)
 Set the thickness for a libDXF donut entity.
double dxf_donut_get_linetype_scale (DxfDonut *donut)
 Get the linetype_scale from a libDXF donut entity.
DxfDonutdxf_donut_set_linetype_scale (DxfDonut *donut, double linetype_scale)
 Set the linetype_scale for a libDXF donut entity.
int16_t dxf_donut_get_visibility (DxfDonut *donut)
 Get the visibility from a libDXF donut entity.
DxfDonutdxf_donut_set_visibility (DxfDonut *donut, int16_t visibility)
 Set the visibility for a libDXF donut entity.
int dxf_donut_get_color (DxfDonut *donut)
 Get the color from a libDXF donut entity.
DxfDonutdxf_donut_set_color (DxfDonut *donut, int color)
 Set the color for a libDXF donut entity.
int dxf_donut_get_paperspace (DxfDonut *donut)
 Get the paperspace flag value from a libDXF donut entity.
DxfDonutdxf_donut_set_paperspace (DxfDonut *donut, int paperspace)
 Set the paperspace flag for a libDXF donut entity.
int dxf_donut_get_graphics_data_size (DxfDonut *donut)
 Get the graphics_data_size value from a libDXF donut entity.
DxfDonutdxf_donut_set_graphics_data_size (DxfDonut *donut, int graphics_data_size)
 Set the graphics_data_size value for a libDXF donut entity.
int16_t dxf_donut_get_shadow_mode (DxfDonut *donut)
 Get the shadow_mode from a libDXF donut entity.
DxfDonutdxf_donut_set_shadow_mode (DxfDonut *donut, int16_t shadow_mode)
 Set the shadow_mode for a libDXF donut entity.
DxfBinaryGraphicsDatadxf_donut_get_binary_graphics_data (DxfDonut *donut)
 Get the pointer to the binary_graphics_data from a libDXF donut entity.
DxfDonutdxf_donut_set_binary_graphics_data (DxfDonut *donut, DxfBinaryGraphicsData *data)
 Set the pointer to the binary_graphics_data for a libDXF donut entity.
char * dxf_donut_get_dictionary_owner_soft (DxfDonut *donut)
 Get the soft pointer to the dictionary_owner_soft from a libDXF donut entity.
DxfDonutdxf_donut_set_dictionary_owner_soft (DxfDonut *donut, char *dictionary_owner_soft)
 Set the pointer to the dictionary_owner_soft for a libDXF donut entity.
char * dxf_donut_get_material (DxfDonut *donut)
 Get the pointer to the material from a libDXF donut entity.
DxfDonutdxf_donut_set_material (DxfDonut *donut, char *material)
 Set the pointer to the material for a libDXF donut entity.
char * dxf_donut_get_dictionary_owner_hard (DxfDonut *donut)
 Get the pointer to the dictionary_owner_hard from a libDXF donut entity.
DxfDonutdxf_donut_set_dictionary_owner_hard (DxfDonut *donut, char *dictionary_owner_hard)
 Set the pointer to the dictionary_owner_hard for a libDXF donut entity.
int16_t dxf_donut_get_lineweight (DxfDonut *donut)
 Get the lineweight from a libDXF donut entity.
DxfDonutdxf_donut_set_lineweight (DxfDonut *donut, int16_t lineweight)
 Set the lineweight for a libDXF donut entity.
char * dxf_donut_get_plot_style_name (DxfDonut *donut)
 Get the plot_style_name from a libDXF donut entity.
DxfDonutdxf_donut_set_plot_style_name (DxfDonut *donut, char *plot_style_name)
 Set the plot_style_name for a libDXF donut entity.
long dxf_donut_get_color_value (DxfDonut *donut)
 Get the color_value from a libDXF donut entity.
DxfDonutdxf_donut_set_color_value (DxfDonut *donut, long color_value)
 Set the color_value for a libDXF donut entity.
char * dxf_donut_get_color_name (DxfDonut *donut)
 Get the color_name from a libDXF donut entity.
DxfDonutdxf_donut_set_color_name (DxfDonut *donut, char *color_name)
 Set the color_name for a libDXF donut entity.
long dxf_donut_get_transparency (DxfDonut *donut)
 Get the transparency from a libDXF donut entity.
DxfDonutdxf_donut_set_transparency (DxfDonut *donut, long transparency)
 Set the transparency for a libDXF donut entity.
DxfPointdxf_donut_get_p0 (DxfDonut *donut)
 Get the insertion point of a libDXF donut entity.
DxfDonutdxf_donut_set_p0 (DxfDonut *donut, DxfPoint *p0)
 Set the insertion point p0 of a libDXF donut entity.
double dxf_donut_get_x0 (DxfDonut *donut)
 Get the X-value of the insertion point x0 of a libDXF donut entity.
DxfDonutdxf_donut_set_x0 (DxfDonut *donut, double x0)
 Set the X-value of the insertion point x0 of a libDXF donut entity.
double dxf_donut_get_y0 (DxfDonut *donut)
 Get the Y-value of the insertion point y0 of a libDXF donut entity.
DxfDonutdxf_donut_set_y0 (DxfDonut *donut, double y0)
 Set the Y-value of the insertion point y0 of a libDXF donut entity.
double dxf_donut_get_z0 (DxfDonut *donut)
 Get the Z-value of the insertion point z0 of a libDXF donut entity.
DxfDonutdxf_donut_set_z0 (DxfDonut *donut, double z0)
 Set the Z-value of the insertion point z0 of a libDXF donut entity.
double dxf_donut_get_outside_diameter (DxfDonut *donut)
 Get the outside_diameter of a libDXF donut entity.
DxfDonutdxf_donut_set_outside_diameter (DxfDonut *donut, double outside_diameter)
 Set the outside_diameter of a libDXF donut entity.
double dxf_donut_get_inside_diameter (DxfDonut *donut)
 Get the inside_diameter of a libDXF donut entity.
DxfDonutdxf_donut_set_inside_diameter (DxfDonut *donut, double inside_diameter)
 Set the inside_diameter of a libDXF donut entity.
DxfDonutdxf_donut_get_next (DxfDonut *donut)
 Get the pointer to the next donut entity from a libDXF donut entity.
DxfDonutdxf_donut_set_next (DxfDonut *donut, DxfDonut *next)
 Set the pointer to the next donut for a libDXF donut entity.
DxfDonutdxf_donut_get_last (DxfDonut *donut)
 Get the pointer to the last donut entity from a linked list of libDXF donut entities.

Detailed Description

Header file for a libDXF donut entity.

Author:
Copyright (C) 2011, 2012, 2013, 2014, 2015, 2016, 2017 by Bert Timmerman <bert.timmerman@xs4all.nl>.
Warning:
This is not an official AutoCAD entity.

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 donut.h.


Typedef Documentation

typedef struct dxf_donut_struct DxfDonut

Definition of a libDXF donut entity.

A libDXF donut is a typical convenience struct.

Warning:
This is not an official AutoCAD entity.

Function Documentation

DxfDonut* dxf_donut_new ( )

Allocate memory for a libDXF donut.

Fill the memory contents with zeros.

Returns:
NULL when no memory was allocated, a pointer to the allocated memory when succesful.

Definition at line 54 of file donut.c.

References _, DXF_DEBUG_BEGIN, and DXF_DEBUG_END.

Referenced by dxf_donut_init().

DxfDonut* dxf_donut_init ( DxfDonut donut)
int dxf_donut_write ( DxfFile fp,
DxfDonut donut 
)

Write DXF output to a file for a libDXF donut.

A typical convenience function.
Draw a donut by means of two bulged vertices into a single polyline.

Returns:
EXIT_SUCCESS when done, or EXIT_FAILURE when an error occurred.

Todo:
Hook up this polyline to the list of polylines.
Todo:
Hook up this vertex to the list of vertices.
Todo:
Hook up this vertex to the list of vertices.
Todo:
Hook up this seqend to the list of seqends.

Parameters:
fpDXF file pointer to an output file (or device).
donutPointer to a donut struct.

Definition at line 161 of file donut.c.

References _, dxf_vertex_struct::bulge, dxf_vertex_struct::color, dxf_vertex_struct::curve_fit_tangent_direction, DXF_DEBUG_BEGIN, DXF_DEBUG_END, DXF_DEFAULT_LAYER, DXF_DEFAULT_LINETYPE, dxf_donut_get_color(), dxf_donut_get_id_code(), dxf_donut_get_inside_diameter(), dxf_donut_get_layer(), dxf_donut_get_linetype(), dxf_donut_get_outside_diameter(), dxf_donut_get_paperspace(), dxf_donut_get_thickness(), dxf_donut_get_x0(), dxf_donut_get_y0(), dxf_donut_get_z0(), dxf_donut_set_layer(), dxf_donut_set_linetype(), dxf_polyline_init(), dxf_polyline_new(), dxf_polyline_write(), dxf_seqend_init(), dxf_seqend_new(), dxf_seqend_write(), dxf_vertex_init(), dxf_vertex_new(), dxf_vertex_write(), dxf_vertex_struct::end_width, dxf_vertex_struct::flag, dxf_seqend_struct::id_code, dxf_vertex_struct::id_code, dxf_dimstyle_struct::id_code, dxf_file_struct::last_id_code, dxf_seqend_struct::layer, dxf_vertex_struct::layer, dxf_seqend_struct::linetype, dxf_vertex_struct::linetype, dxf_vertex_struct::paperspace, dxf_vertex_struct::start_width, dxf_vertex_struct::thickness, dxf_vertex_struct::x0, dxf_vertex_struct::y0, and dxf_vertex_struct::z0.

Here is the call graph for this function:

int dxf_donut_free ( DxfDonut donut)

Free the allocated memory for a libDXF donut and all it's data fields.

Returns:
EXIT_SUCCESS when done, or EXIT_FAILURE when an error occurred.
Parameters:
donutPointer to the memory occupied by the libDXF donut entity.

Definition at line 325 of file donut.c.

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

Referenced by dxf_donut_free_chain().

void dxf_donut_free_chain ( DxfDonut donuts)

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

Version:
According to DXF R10.
According to DXF R11.
According to DXF R12.
According to DXF R13.
According to DXF R14.
Parameters:
donutspointer to the chain of DXF donut entities.

Definition at line 374 of file donut.c.

References _, DXF_DEBUG_BEGIN, DXF_DEBUG_END, dxf_donut_free(), and dxf_donut_struct::next.

Here is the call graph for this function:

int dxf_donut_get_id_code ( DxfDonut donut)

Get the id_code from a libDXF donut entity.

Returns:
id_code.
Parameters:
donuta pointer to a libDXF donut entity.

Definition at line 407 of file donut.c.

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

Referenced by dxf_donut_write().

DxfDonut* dxf_donut_set_id_code ( DxfDonut donut,
int  id_code 
)

Set the id_code for a libDXF donut entity.

Returns:
a pointer to donut when sucessful, NULL when an error occurred.
Parameters:
donuta pointer to a libDXF donut entity.
id_codeIdentification number for the entity.
This is to be an unique (sequential) number in the DXF file.

Definition at line 444 of file donut.c.

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

Referenced by dxf_donut_init().

char* dxf_donut_get_linetype ( DxfDonut donut)

Get the linetype from a libDXF donut entity.

Returns:
a pointer to linetype when sucessful, NULL when an error occurred.
Parameters:
donuta pointer to a libDXF donut entity.

Definition at line 486 of file donut.c.

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

Referenced by dxf_donut_write().

DxfDonut* dxf_donut_set_linetype ( DxfDonut donut,
char *  linetype 
)

Set the linetype for a libDXF donut entity.

Returns:
a pointer to donut when sucessful, NULL when an error occurred.
Warning:
The passed linetype variable is not freed by this function.
Parameters:
donuta pointer to a libDXF donut entity.
linetypea string containing the linetype for the entity.

Definition at line 527 of file donut.c.

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

Referenced by dxf_donut_init(), and dxf_donut_write().

char* dxf_donut_get_layer ( DxfDonut donut)

Get the layer from a libDXF donut entity.

Returns:
a pointer to layer when sucessful, NULL when an error occurred.
Parameters:
donuta pointer to a libDXF donut entity.

Definition at line 568 of file donut.c.

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

Referenced by dxf_donut_write().

DxfDonut* dxf_donut_set_layer ( DxfDonut donut,
char *  layer 
)

Set the layer for a libDXF donut entity.

Returns:
a pointer to donut when sucessful, NULL when an error occurred.
Warning:
The passed layer variable is not freed by this function.
Parameters:
donuta pointer to a libDXF donut entity.
layera string containing the layer for the entity.

Definition at line 608 of file donut.c.

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

Referenced by dxf_donut_init(), and dxf_donut_write().

double dxf_donut_get_elevation ( DxfDonut donut)

Get the elevation a this libDXF donut entity.

Returns:
elevation.
Parameters:
donuta pointer to a libDXF donut entity.

Definition at line 648 of file donut.c.

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

DxfDonut* dxf_donut_set_elevation ( DxfDonut donut,
double  elevation 
)

Set the elevation for a libDXF donut entity.

Returns:
a pointer to donut when sucessful, NULL when an error occurred.
Parameters:
donuta pointer to a libDXF donut entity.
elevationthe elevation to be set for the entity.

Definition at line 679 of file donut.c.

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

Referenced by dxf_donut_init().

double dxf_donut_get_thickness ( DxfDonut donut)

Get the thickness from a libDXF donut entity.

Returns:
thickness.
Parameters:
donuta pointer to a libDXF donut entity.

Definition at line 712 of file donut.c.

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

Referenced by dxf_donut_write().

DxfDonut* dxf_donut_set_thickness ( DxfDonut donut,
double  thickness 
)

Set the thickness for a libDXF donut entity.

Returns:
a pointer to donut when sucessful, NULL when an error occurred.
Parameters:
donuta pointer to a libDXF donut entity.
thicknessthe thickness to be set for the entity.

Definition at line 749 of file donut.c.

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

Referenced by dxf_donut_init().

double dxf_donut_get_linetype_scale ( DxfDonut donut)

Get the linetype_scale from a libDXF donut entity.

Returns:
linetype_scale.
Parameters:
donuta pointer to a libDXF donut entity.

Definition at line 788 of file donut.c.

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

DxfDonut* dxf_donut_set_linetype_scale ( DxfDonut donut,
double  linetype_scale 
)

Set the linetype_scale for a libDXF donut entity.

Returns:
a pointer to donut when sucessful, NULL when an error occurred.
Parameters:
donuta pointer to a libDXF donut entity.
linetype_scalethe linetype_scale to be set for the entity.

Definition at line 825 of file donut.c.

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

Referenced by dxf_donut_init().

int16_t dxf_donut_get_visibility ( DxfDonut donut)

Get the visibility from a libDXF donut entity.

Returns:
visibility.
Parameters:
donuta pointer to a libDXF donut entity.

Definition at line 864 of file donut.c.

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

DxfDonut* dxf_donut_set_visibility ( DxfDonut donut,
int16_t  visibility 
)

Set the visibility for a libDXF donut entity.

Returns:
a pointer to donut when sucessful, NULL when an error occurred.
Parameters:
donuta pointer to a libDXF donut entity.
visibilitythe visibility to be set for the entity.

Definition at line 909 of file donut.c.

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

Referenced by dxf_donut_init().

int dxf_donut_get_color ( DxfDonut donut)

Get the color from a libDXF donut entity.

Returns:
color.
Parameters:
donuta pointer to a libDXF donut entity.

Definition at line 956 of file donut.c.

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

Referenced by dxf_donut_write().

DxfDonut* dxf_donut_set_color ( DxfDonut donut,
int  color 
)

Set the color for a libDXF donut entity.

Returns:
a pointer to donut when sucessful, NULL when an error occurred.
Parameters:
donuta pointer to a libDXF donut entity.
colorthe color to be set for the entity.

Definition at line 993 of file donut.c.

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

Referenced by dxf_donut_init().

int dxf_donut_get_paperspace ( DxfDonut donut)

Get the paperspace flag value from a libDXF donut entity.

Returns:
paperspace flag value.
Parameters:
donuta pointer to a libDXF donut entity.

Definition at line 1035 of file donut.c.

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

Referenced by dxf_donut_write().

DxfDonut* dxf_donut_set_paperspace ( DxfDonut donut,
int  paperspace 
)

Set the paperspace flag for a libDXF donut entity.

Returns:
a pointer to donut when sucessful, NULL when an error occurred.
Parameters:
donuta pointer to a libDXF donut entity.
paperspacethe paperspace flag value to be set for the entity.

Definition at line 1078 of file donut.c.

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

Referenced by dxf_donut_init().

int dxf_donut_get_graphics_data_size ( DxfDonut donut)

Get the graphics_data_size value from a libDXF donut entity.

Returns:
graphics_data_size value when successful, or EXIT_FAILURE when an error occurred.
Parameters:
donuta pointer to a libDXF donut entity.

Definition at line 1127 of file donut.c.

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

DxfDonut* dxf_donut_set_graphics_data_size ( DxfDonut donut,
int  graphics_data_size 
)

Set the graphics_data_size value for a libDXF donut entity.

Returns:
a pointer to donut when successful, or NULL when an error occurred.
Parameters:
donuta pointer to a libDXF donut entity.
graphics_data_sizethe graphics_data_size value to be set for the entity.

Definition at line 1170 of file donut.c.

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

Referenced by dxf_donut_init().

int16_t dxf_donut_get_shadow_mode ( DxfDonut donut)

Get the shadow_mode from a libDXF donut entity.

Returns:
shadow_mode when successful, or EXIT_FAILURE when an error occurred.
Parameters:
donuta pointer to a libDXF donut entity.

Definition at line 1218 of file donut.c.

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

DxfDonut* dxf_donut_set_shadow_mode ( DxfDonut donut,
int16_t  shadow_mode 
)

Set the shadow_mode for a libDXF donut entity.

Returns:
a pointer to donut when successful, or NULL when an error occurred.
Parameters:
donuta pointer to a libDXF donut entity.
shadow_modethe shadow mode to be set for the entity.

Definition at line 1263 of file donut.c.

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

Referenced by dxf_donut_init().

DxfBinaryGraphicsData* dxf_donut_get_binary_graphics_data ( DxfDonut donut)

Get the pointer to the binary_graphics_data from a libDXF donut entity.

Returns:
pointer to the binary_graphics_data.
Warning:
No checks are performed on the returned pointer.
Parameters:
donuta pointer to a libDXF donut entity.

Definition at line 1313 of file donut.c.

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

DxfDonut* dxf_donut_set_binary_graphics_data ( DxfDonut donut,
DxfBinaryGraphicsData data 
)

Set the pointer to the binary_graphics_data for a libDXF donut entity.

Parameters:
donuta pointer to a libDXF donut entity.
dataa string containing the pointer to the binary_graphics_data for the entity.

Definition at line 1349 of file donut.c.

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

Referenced by dxf_donut_init().

char* dxf_donut_get_dictionary_owner_soft ( DxfDonut donut)

Get the soft pointer to the dictionary_owner_soft from a libDXF donut entity.

Returns:
a pointer to the dictionary_owner_soft.
Warning:
No checks are performed on the returned pointer.
Parameters:
donuta pointer to a libDXF donut entity.

Definition at line 1393 of file donut.c.

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

DxfDonut* dxf_donut_set_dictionary_owner_soft ( DxfDonut donut,
char *  dictionary_owner_soft 
)

Set the pointer to the dictionary_owner_soft for a libDXF donut entity.

Parameters:
donuta pointer to a libDXF donut entity.
dictionary_owner_softa string containing the pointer to the dictionary_owner_soft for the entity.

Definition at line 1429 of file donut.c.

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

Referenced by dxf_donut_init().

char* dxf_donut_get_material ( DxfDonut donut)

Get the pointer to the material from a libDXF donut entity.

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

Definition at line 1474 of file donut.c.

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

DxfDonut* dxf_donut_set_material ( DxfDonut donut,
char *  material 
)

Set the pointer to the material for a libDXF donut entity.

Returns:
a pointer to donut when successful, or NULL when an error occurred.
Parameters:
donuta pointer to a libDXF donut entity.
materiala string containing the pointer to the material for the entity.

Definition at line 1513 of file donut.c.

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

Referenced by dxf_donut_init().

char* dxf_donut_get_dictionary_owner_hard ( DxfDonut donut)

Get the pointer to the dictionary_owner_hard from a libDXF donut entity.

Returns:
a pointer to the dictionary_owner_hard.
Warning:
No checks are performed on the returned pointer.
Parameters:
donuta pointer to a libDXF donut entity.

Definition at line 1557 of file donut.c.

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

DxfDonut* dxf_donut_set_dictionary_owner_hard ( DxfDonut donut,
char *  dictionary_owner_hard 
)

Set the pointer to the dictionary_owner_hard for a libDXF donut entity.

Returns:
a pointer to donut when sucessful, NULL when an error occurred.
Parameters:
donuta pointer to a libDXF donut entity.
dictionary_owner_harda string containing the pointer to the dictionary_owner_hard for the entity.

Definition at line 1596 of file donut.c.

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

Referenced by dxf_donut_init().

int16_t dxf_donut_get_lineweight ( DxfDonut donut)

Get the lineweight from a libDXF donut entity.

Returns:
lineweight when successful, or EXIT_FAILURE when an error occurred.
Parameters:
donuta pointer to a libDXF donut entity.

Definition at line 1638 of file donut.c.

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

DxfDonut* dxf_donut_set_lineweight ( DxfDonut donut,
int16_t  lineweight 
)

Set the lineweight for a libDXF donut entity.

Returns:
a pointer to donut when successful, or NULL when an error occurred.
Parameters:
donuta pointer to a libDXF donut entity.
lineweightthe lineweight to be set for the entity.

Definition at line 1669 of file donut.c.

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

Referenced by dxf_donut_init().

char* dxf_donut_get_plot_style_name ( DxfDonut donut)

Get the plot_style_name from a libDXF donut entity.

Returns:
a pointer to plot_style_name when sucessful, or NULL when an error occurred.
Parameters:
donuta pointer to a libDXF donut entity.

Definition at line 1703 of file donut.c.

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

DxfDonut* dxf_donut_set_plot_style_name ( DxfDonut donut,
char *  plot_style_name 
)

Set the plot_style_name for a libDXF donut entity.

Returns:
a pointer to donut when successful, or NULL when an error occurred.
Parameters:
donuta pointer to a libDXF donut entity.
plot_style_namea string containing the plot_style_name for the entity.

Definition at line 1741 of file donut.c.

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

Referenced by dxf_donut_init().

long dxf_donut_get_color_value ( DxfDonut donut)

Get the color_value from a libDXF donut entity.

Returns:
color_value when successful, or EXIT_FAILURE when an error occurred.
Parameters:
donuta pointer to a libDXF donut entity.

Definition at line 1783 of file donut.c.

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

DxfDonut* dxf_donut_set_color_value ( DxfDonut donut,
long  color_value 
)

Set the color_value for a libDXF donut entity.

Returns:
a pointer to donut when successful, or NULL when an error occurred.
Parameters:
donuta pointer to a libDXF donut entity.
color_valuethe color_value to be set for the entity.

Definition at line 1814 of file donut.c.

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

Referenced by dxf_donut_init().

char* dxf_donut_get_color_name ( DxfDonut donut)

Get the color_name from a libDXF donut entity.

Returns:
color_name when sucessful, or NULL when an error occurred.
Parameters:
donuta pointer to a libDXF donut entity.

Definition at line 1848 of file donut.c.

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

DxfDonut* dxf_donut_set_color_name ( DxfDonut donut,
char *  color_name 
)

Set the color_name for a libDXF donut entity.

Returns:
a pointer to donut when successful, or NULL when an error occurred.
Parameters:
donuta pointer to a libDXF donut entity.
color_namea string containing the color_name for the entity.

Definition at line 1886 of file donut.c.

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

Referenced by dxf_donut_init().

long dxf_donut_get_transparency ( DxfDonut donut)

Get the transparency from a libDXF donut entity.

Returns:
transparency when successful, or EXIT_FAILURE when an error occurred.
Parameters:
donuta pointer to a libDXF donut entity.

Definition at line 1928 of file donut.c.

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

DxfDonut* dxf_donut_set_transparency ( DxfDonut donut,
long  transparency 
)

Set the transparency for a libDXF donut entity.

Returns:
a pointer to donut when successful, or NULL when an error occurred.
Parameters:
donuta pointer to a libDXF donut entity.
transparencythe transparency to be set for the entity.

Definition at line 1959 of file donut.c.

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

Referenced by dxf_donut_init().

DxfPoint* dxf_donut_get_p0 ( DxfDonut donut)

Get the insertion point of a libDXF donut entity.

Returns:
the insertion point p0.
Parameters:
donuta pointer to a libDXF donut entity.

Definition at line 1992 of file donut.c.

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

DxfDonut* dxf_donut_set_p0 ( DxfDonut donut,
DxfPoint p0 
)

Set the insertion point p0 of a libDXF donut entity.

Returns:
a pointer to donut when successful, or NULL when an error occurred.
Parameters:
donuta pointer to a libDXF donut entity.
p0a pointer to a DXF POINT entity.

Definition at line 2030 of file donut.c.

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

double dxf_donut_get_x0 ( DxfDonut donut)

Get the X-value of the insertion point x0 of a libDXF donut entity.

Returns:
the X-value of the insertion point x0.
Parameters:
donuta pointer to a libDXF donut entity.

Definition at line 2071 of file donut.c.

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

Referenced by dxf_donut_write().

DxfDonut* dxf_donut_set_x0 ( DxfDonut donut,
double  x0 
)

Set the X-value of the insertion point x0 of a libDXF donut entity.

Returns:
a pointer to donut when successful, or NULL when an error occurred.
Parameters:
donuta pointer to a libDXF donut entity.
x0the X-value of the insertion point x0 of a libDXF donut entity.

Definition at line 2111 of file donut.c.

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

Referenced by dxf_donut_init().

double dxf_donut_get_y0 ( DxfDonut donut)

Get the Y-value of the insertion point y0 of a libDXF donut entity.

Returns:
the Y-value of the insertion point y0.
Parameters:
donuta pointer to a libDXF donut entity.

Definition at line 2153 of file donut.c.

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

Referenced by dxf_donut_write().

DxfDonut* dxf_donut_set_y0 ( DxfDonut donut,
double  y0 
)

Set the Y-value of the insertion point y0 of a libDXF donut entity.

Returns:
a pointer to donut when successful, or NULL when an error occurred.
Parameters:
donuta pointer to a libDXF donut entity.
y0the Y-value of the insertion point y0 of a libDXF donut entity.

Definition at line 2193 of file donut.c.

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

Referenced by dxf_donut_init().

double dxf_donut_get_z0 ( DxfDonut donut)

Get the Z-value of the insertion point z0 of a libDXF donut entity.

Returns:
the Z-value of the insertion point z0.
Parameters:
donuta pointer to a libDXF donut entity.

Definition at line 2235 of file donut.c.

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

Referenced by dxf_donut_write().

DxfDonut* dxf_donut_set_z0 ( DxfDonut donut,
double  z0 
)

Set the Z-value of the insertion point z0 of a libDXF donut entity.

Returns:
a pointer to donut when successful, or NULL when an error occurred.
Parameters:
donuta pointer to a DXF 3DFACE entity.
z0the Z-value of the insertion point z0 of a libDXF donut entity.

Definition at line 2275 of file donut.c.

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

Referenced by dxf_donut_init().

double dxf_donut_get_outside_diameter ( DxfDonut donut)

Get the outside_diameter of a libDXF donut entity.

Returns:
the outside_diameter.
Parameters:
donuta pointer to a DXF 3DFACE entity.

Definition at line 2316 of file donut.c.

References _, DXF_DEBUG_BEGIN, DXF_DEBUG_END, and dxf_donut_struct::outside_diameter.

Referenced by dxf_donut_write().

DxfDonut* dxf_donut_set_outside_diameter ( DxfDonut donut,
double  outside_diameter 
)

Set the outside_diameter of a libDXF donut entity.

Returns:
a pointer to donut when successful, or NULL when an error occurred.
Parameters:
donuta pointer to a DXF 3DFACE entity.
outside_diameterthe outside_diameter of a libDXF donut entity.

Definition at line 2348 of file donut.c.

References _, DXF_DEBUG_BEGIN, DXF_DEBUG_END, and dxf_donut_struct::outside_diameter.

Referenced by dxf_donut_init().

double dxf_donut_get_inside_diameter ( DxfDonut donut)

Get the inside_diameter of a libDXF donut entity.

Returns:
the inside_diameter.
Parameters:
donuta pointer to a DXF 3DFACE entity.

Definition at line 2382 of file donut.c.

References _, DXF_DEBUG_BEGIN, DXF_DEBUG_END, and dxf_donut_struct::inside_diameter.

Referenced by dxf_donut_write().

DxfDonut* dxf_donut_set_inside_diameter ( DxfDonut donut,
double  inside_diameter 
)

Set the inside_diameter of a libDXF donut entity.

Returns:
a pointer to donut when successful, or NULL when an error occurred.
Parameters:
donuta pointer to a DXF 3DFACE entity.
inside_diameterthe inside_diameter of a libDXF donut entity.

Definition at line 2414 of file donut.c.

References _, DXF_DEBUG_BEGIN, DXF_DEBUG_END, and dxf_donut_struct::inside_diameter.

Referenced by dxf_donut_init().

DxfDonut* dxf_donut_get_next ( DxfDonut donut)

Get the pointer to the next donut entity from a libDXF donut entity.

Returns:
pointer to the next donut entity.
Warning:
No checks are performed on the returned pointer.
Parameters:
donuta pointer to a libDXF donut entity.

Definition at line 2451 of file donut.c.

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

DxfDonut* dxf_donut_set_next ( DxfDonut donut,
DxfDonut next 
)

Set the pointer to the next donut for a libDXF donut entity.

Returns:
a pointer to donut when successful, or NULL when an error occurred.
Parameters:
donuta pointer to a libDXF donut entity.
nexta pointer to the next donut for the entity.

Definition at line 2490 of file donut.c.

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

Referenced by dxf_donut_init().

DxfDonut* dxf_donut_get_last ( DxfDonut donut)

Get the pointer to the last donut entity from a linked list of libDXF donut entities.

Returns:
pointer to the last donut entity.
Warning:
No checks are performed on the returned pointer.
Parameters:
donuta pointer to a libDXF donut entity.

Definition at line 2533 of file donut.c.

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