libDXF 0.0.1
A library with DXF related functions written in C.
|
Functions for a libDXF drawing. More...
#include "drawing.h"
Go to the source code of this file.
Functions | |
DxfDrawing * | dxf_drawing_new () |
Allocate memory for a libDXF drawing . | |
DxfDrawing * | dxf_drawing_init (DxfDrawing *drawing, int acad_version_number) |
Allocate memory and initialize data fields in a libDXF drawing. | |
int | dxf_drawing_free (DxfDrawing *drawing) |
Free the allocated memory for a libDXF drawing and all it's data fields. | |
DxfHeader * | dxf_drawing_get_header (DxfDrawing *drawing) |
Get the header from a libDXF drawing. | |
DxfDrawing * | dxf_drawing_set_header (DxfDrawing *drawing, DxfHeader *header) |
Set the header for a libDXF drawing. | |
DxfClass * | dxf_drawing_get_class_list (DxfDrawing *drawing) |
Get the first entry to the Classes list from a libDXF drawing. | |
DxfDrawing * | dxf_drawing_set_class_list (DxfDrawing *drawing, DxfClass *class_list) |
Set the first entry to the Classes list for a libDXF drawing. | |
DxfTables * | dxf_drawing_get_tables_list (DxfDrawing *drawing) |
Get the first entry to the Tables list from a libDXF drawing. | |
DxfDrawing * | dxf_drawing_set_tables_list (DxfDrawing *drawing, DxfTables *tables_list) |
Set the first entry to the Tables list for a libDXF drawing. | |
DxfBlock * | dxf_drawing_get_block_list (DxfDrawing *drawing) |
Get the first entry to the Block list from a libDXF drawing. | |
DxfDrawing * | dxf_drawing_set_block_list (DxfDrawing *drawing, DxfBlock *block_list) |
Set the first entry to the Block list for a libDXF drawing. | |
DxfEntities * | dxf_drawing_get_entities_list (DxfDrawing *drawing) |
Get the first entry to the Entities list from a libDXF drawing. | |
DxfDrawing * | dxf_drawing_set_entities_list (DxfDrawing *drawing, DxfEntities *entities_list) |
Set the first entry to the Entities list for a libDXF drawing. | |
DxfObject * | dxf_drawing_get_object_list (DxfDrawing *drawing) |
Get the first entry to the Object list from a libDXF drawing. | |
DxfDrawing * | dxf_drawing_set_object_list (DxfDrawing *drawing, DxfObject *object_list) |
Set the first entry to the Object list for a libDXF drawing. | |
DxfThumbnail * | dxf_drawing_get_thumbnail (DxfDrawing *drawing) |
Get the thumbnail from a libDXF drawing. | |
DxfDrawing * | dxf_drawing_set_thumbnail (DxfDrawing *drawing, DxfThumbnail *thumbnail) |
Set the thumbnail for a libDXF drawing. |
Functions for a libDXF drawing.
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 drawing.c.
DxfDrawing* dxf_drawing_new | ( | ) |
Allocate memory for a libDXF drawing
.
Fill the memory contents with zeros.
NULL
when no memory was allocated, a pointer to the allocated memory when succesful. Definition at line 47 of file drawing.c.
References _, DXF_DEBUG_BEGIN, and DXF_DEBUG_END.
Referenced by dxf_drawing_init().
DxfDrawing* dxf_drawing_init | ( | DxfDrawing * | drawing, |
int | acad_version_number | ||
) |
Allocate memory and initialize data fields in a libDXF drawing.
NULL
when no memory was allocated, a pointer to the allocated memory when succesful. drawing | a pointer to the libDXF drawing. |
acad_version_number | AutoCAD version number. |
Definition at line 84 of file drawing.c.
References _, dxf_drawing_struct::block_list, dxf_drawing_struct::class_list, dxf_block_init(), dxf_class_init(), DXF_DEBUG_BEGIN, DXF_DEBUG_END, dxf_drawing_new(), dxf_header_init(), dxf_object_init(), dxf_thumbnail_init(), dxf_drawing_struct::header, dxf_drawing_struct::object_list, and dxf_drawing_struct::thumbnail.
int dxf_drawing_free | ( | DxfDrawing * | drawing | ) |
Free the allocated memory for a libDXF drawing and all it's data fields.
EXIT_SUCCESS
when done, or EXIT_FAILURE
when an error occurred. drawing | a pointer to the memory occupied by the libDXF drawing. |
Definition at line 131 of file drawing.c.
References _, dxf_drawing_struct::block_list, dxf_drawing_struct::class_list, dxf_block_free_chain(), dxf_class_free_chain(), DXF_DEBUG_BEGIN, DXF_DEBUG_END, dxf_header_free(), dxf_object_free_chain(), dxf_thumbnail_free(), dxf_drawing_struct::header, dxf_drawing_struct::object_list, and dxf_drawing_struct::thumbnail.
DxfHeader* dxf_drawing_get_header | ( | DxfDrawing * | drawing | ) |
Get the header from a libDXF drawing.
header
when successful, NULL
when an error occurred. drawing | a pointer to a libDXF drawing. |
Definition at line 170 of file drawing.c.
References _, DEBUG, DXF_DEBUG_BEGIN, DXF_DEBUG_END, and dxf_drawing_struct::header.
DxfDrawing* dxf_drawing_set_header | ( | DxfDrawing * | drawing, |
DxfHeader * | header | ||
) |
Set the header for a libDXF drawing.
NULL
when an error occurred. drawing | a pointer to a libDXF drawing. |
header | a string containing the header for the libDXF drawing. |
Definition at line 211 of file drawing.c.
References _, DXF_DEBUG_BEGIN, DXF_DEBUG_END, and dxf_drawing_struct::header.
DxfClass* dxf_drawing_get_class_list | ( | DxfDrawing * | drawing | ) |
Get the first entry to the Classes list from a libDXF drawing.
class_list
when sucessful, NULL
when an error occurred. drawing | a pointer to a libDXF drawing. |
Definition at line 252 of file drawing.c.
References _, dxf_drawing_struct::class_list, DEBUG, DXF_DEBUG_BEGIN, and DXF_DEBUG_END.
DxfDrawing* dxf_drawing_set_class_list | ( | DxfDrawing * | drawing, |
DxfClass * | class_list | ||
) |
Set the first entry to the Classes list for a libDXF drawing.
NULL
when an error occurred. drawing | a pointer to a libDXF drawing. |
class_list | a pointer containing the first entry to the Classes list for the libDXF drawing. |
Definition at line 293 of file drawing.c.
References _, dxf_drawing_struct::class_list, DXF_DEBUG_BEGIN, and DXF_DEBUG_END.
DxfTables* dxf_drawing_get_tables_list | ( | DxfDrawing * | drawing | ) |
Get the first entry to the Tables list from a libDXF drawing.
tables_list
when sucessful, NULL
when an error occurred. drawing | a pointer to a libDXF drawing. |
Definition at line 334 of file drawing.c.
References _, DEBUG, DXF_DEBUG_BEGIN, DXF_DEBUG_END, and dxf_drawing_struct::tables_list.
DxfDrawing* dxf_drawing_set_tables_list | ( | DxfDrawing * | drawing, |
DxfTables * | tables_list | ||
) |
Set the first entry to the Tables list for a libDXF drawing.
NULL
when an error occurred. drawing | a pointer to a libDXF drawing. |
tables_list | a pointer containing the first entry to the Tables list for the libDXF drawing. |
Definition at line 375 of file drawing.c.
References _, DXF_DEBUG_BEGIN, DXF_DEBUG_END, and dxf_drawing_struct::tables_list.
DxfBlock* dxf_drawing_get_block_list | ( | DxfDrawing * | drawing | ) |
Get the first entry to the Block list from a libDXF drawing.
block_list
when sucessful, NULL
when an error occurred. drawing | a pointer to a libDXF drawing. |
Definition at line 416 of file drawing.c.
References _, dxf_drawing_struct::block_list, DEBUG, DXF_DEBUG_BEGIN, and DXF_DEBUG_END.
DxfDrawing* dxf_drawing_set_block_list | ( | DxfDrawing * | drawing, |
DxfBlock * | block_list | ||
) |
Set the first entry to the Block list for a libDXF drawing.
NULL
when an error occurred. drawing | a pointer to a libDXF drawing. |
block_list | a pointer containing the first entry to the Block list for the libDXF drawing. |
Definition at line 457 of file drawing.c.
References _, dxf_drawing_struct::block_list, DXF_DEBUG_BEGIN, and DXF_DEBUG_END.
DxfEntities* dxf_drawing_get_entities_list | ( | DxfDrawing * | drawing | ) |
Get the first entry to the Entities list from a libDXF drawing.
entities_list
when sucessful, NULL
when an error occurred. drawing | a pointer to a libDXF drawing. |
Definition at line 499 of file drawing.c.
References _, DEBUG, DXF_DEBUG_BEGIN, DXF_DEBUG_END, and dxf_drawing_struct::entities_list.
DxfDrawing* dxf_drawing_set_entities_list | ( | DxfDrawing * | drawing, |
DxfEntities * | entities_list | ||
) |
Set the first entry to the Entities list for a libDXF drawing.
NULL
when an error occurred. drawing | a pointer to a libDXF drawing. |
entities_list | a pointer containing the first entry to the Entities list for the libDXF drawing. |
Definition at line 540 of file drawing.c.
References _, DXF_DEBUG_BEGIN, DXF_DEBUG_END, and dxf_drawing_struct::entities_list.
DxfObject* dxf_drawing_get_object_list | ( | DxfDrawing * | drawing | ) |
Get the first entry to the Object list from a libDXF drawing.
object_list
when sucessful, NULL
when an error occurred. drawing | a pointer to a libDXF drawing. |
Definition at line 582 of file drawing.c.
References _, DEBUG, DXF_DEBUG_BEGIN, DXF_DEBUG_END, and dxf_drawing_struct::object_list.
DxfDrawing* dxf_drawing_set_object_list | ( | DxfDrawing * | drawing, |
DxfObject * | object_list | ||
) |
Set the first entry to the Object list for a libDXF drawing.
NULL
when an error occurred. drawing | a pointer to a libDXF drawing. |
object_list | a pointer containing the first entry to the Object list for the libDXF drawing. |
Definition at line 623 of file drawing.c.
References _, DXF_DEBUG_BEGIN, DXF_DEBUG_END, and dxf_drawing_struct::object_list.
DxfThumbnail* dxf_drawing_get_thumbnail | ( | DxfDrawing * | drawing | ) |
Get the thumbnail from a libDXF drawing.
thumbnail
when sucessful, NULL
when an error occurred. drawing | a pointer to a libDXF drawing. |
Definition at line 664 of file drawing.c.
References _, DEBUG, DXF_DEBUG_BEGIN, DXF_DEBUG_END, and dxf_drawing_struct::thumbnail.
DxfDrawing* dxf_drawing_set_thumbnail | ( | DxfDrawing * | drawing, |
DxfThumbnail * | thumbnail | ||
) |
Set the thumbnail for a libDXF drawing.
NULL
when an error occurred. drawing | a pointer to a libDXF drawing. |
thumbnail | a pointer containing the thumbnail for the libDXF drawing. |
Definition at line 705 of file drawing.c.
References _, DXF_DEBUG_BEGIN, DXF_DEBUG_END, and dxf_drawing_struct::thumbnail.