libDXF 0.0.1
A library with DXF related functions written in C.
|
Definition of a DXF trace entity (TRACE
).
More...
#include "global.h"
Go to the source code of this file.
Data Structures | |
struct | dxf_trace |
DXF definition of an AutoCAD trace entity. More... | |
Typedefs | |
typedef struct dxf_trace | DxfTrace |
DXF definition of an AutoCAD trace entity. | |
Functions | |
DxfTrace * | dxf_trace_new () |
Allocate memory for a DXF TRACE . | |
DxfTrace * | dxf_trace_init (DxfTrace *trace) |
Allocate memory and initialize data fields in a DXF TRACE entity. | |
DxfTrace * | dxf_trace_read (DxfFile *fp, DxfTrace *trace) |
Read data from a DXF file into a DXF TRACE entity. | |
int | dxf_trace_write (DxfFile *fp, DxfTrace *trace) |
Write DXF output to fp for a DCF TRACE entity. | |
int | dxf_trace_free (DxfTrace *trace) |
Free the allocated memory for a DXF TRACE and all it's data fields. | |
void | dxf_trace_free_chain (DxfTrace *traces) |
Free the allocated memory for a chain of DXF TRACE entities and all their data fields. |
Definition of a DXF trace entity (TRACE
).
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 trace.h.
DXF definition of an AutoCAD trace entity.
DxfTrace* dxf_trace_new | ( | ) |
Allocate memory for a DXF TRACE
.
Fill the memory contents with zeros.
NULL
when no memory was allocated, a pointer to the allocated memory when succesful.Definition at line 56 of file trace.c.
References _, DXF_DEBUG_BEGIN, and DXF_DEBUG_END.
Referenced by dxf_trace_init(), and dxf_trace_read().
Allocate memory and initialize data fields in a DXF TRACE
entity.
NULL
when no memory was allocated, a pointer to the allocated memory when succesful.trace | a pointer to the DXF TRACE entity. |
Definition at line 100 of file trace.c.
References _, dxf_trace::color, dxf_trace::dictionary_owner_hard, dxf_trace::dictionary_owner_soft, DXF_COLOR_BYLAYER, DXF_DEBUG_BEGIN, DXF_DEBUG_END, DXF_DEFAULT_LAYER, DXF_DEFAULT_LINETYPE, DXF_DEFAULT_LINETYPE_SCALE, DXF_DEFAULT_VISIBILITY, DXF_MODELSPACE, dxf_trace_new(), dxf_trace::elevation, dxf_trace::extr_x0, dxf_trace::extr_y0, dxf_trace::extr_z0, dxf_trace::id_code, dxf_trace::layer, dxf_trace::linetype, dxf_trace::linetype_scale, dxf_trace::next, dxf_trace::paperspace, dxf_trace::thickness, dxf_trace::visibility, dxf_trace::x0, dxf_trace::x1, dxf_trace::x2, dxf_trace::x3, dxf_trace::y0, dxf_trace::y1, dxf_trace::y2, dxf_trace::y3, dxf_trace::z0, dxf_trace::z1, dxf_trace::z2, and dxf_trace::z3.
Referenced by dxf_trace_read().
Read data from a DXF file into a DXF TRACE
entity.
The last line read from file contained the string "TRACE".
Now follows some data for the TRACE
, 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 trace
.
fp | DXF file pointer to an input file (or device). |
trace | a pointer to the DXF TRACE entity. |
Definition at line 174 of file trace.c.
References _, dxf_file_struct::acad_version_number, AutoCAD_11, AutoCAD_13, dxf_trace::color, dxf_trace::dictionary_owner_hard, dxf_trace::dictionary_owner_soft, DXF_DEBUG_BEGIN, DXF_DEBUG_END, DXF_DEFAULT_LAYER, DXF_DEFAULT_LINETYPE, dxf_trace_init(), dxf_trace_new(), dxf_trace::elevation, dxf_trace::extr_x0, dxf_trace::extr_y0, dxf_trace::extr_z0, dxf_file_struct::filename, dxf_file_struct::fp, dxf_trace::id_code, dxf_trace::layer, dxf_file_struct::line_number, dxf_trace::linetype, dxf_trace::linetype_scale, dxf_trace::paperspace, dxf_trace::thickness, dxf_trace::visibility, dxf_trace::x0, dxf_trace::x1, dxf_trace::x2, dxf_trace::x3, dxf_trace::y0, dxf_trace::y1, dxf_trace::y2, dxf_trace::y3, dxf_trace::z0, dxf_trace::z1, dxf_trace::z2, and dxf_trace::z3.
Write DXF output to fp for a DCF TRACE
entity.
EXIT_SUCCESS
when done, or EXIT_FAILURE
when an error occurred.fp | DXF file pointer to an output file (or device). |
trace | a pointer to the DXF TRACE entity. |
Definition at line 462 of file trace.c.
References _, dxf_file_struct::acad_version_number, AutoCAD_11, AutoCAD_12, AutoCAD_13, AutoCAD_14, dxf_trace::color, dxf_trace::dictionary_owner_hard, dxf_trace::dictionary_owner_soft, DXF_COLOR_BYLAYER, DXF_DEBUG_BEGIN, DXF_DEBUG_END, DXF_DEFAULT_LAYER, DXF_DEFAULT_LINETYPE, DXF_FLATLAND, DXF_PAPERSPACE, dxf_trace::elevation, dxf_trace::extr_x0, dxf_trace::extr_y0, dxf_trace::extr_z0, dxf_file_struct::fp, dxf_trace::id_code, dxf_trace::layer, dxf_trace::linetype, dxf_trace::linetype_scale, dxf_trace::paperspace, dxf_trace::thickness, dxf_trace::visibility, dxf_trace::x0, dxf_trace::x1, dxf_trace::x2, dxf_trace::x3, dxf_trace::y0, dxf_trace::y1, dxf_trace::y2, dxf_trace::y3, dxf_trace::z0, dxf_trace::z1, dxf_trace::z2, and dxf_trace::z3.
int dxf_trace_free | ( | DxfTrace * | trace | ) |
Free the allocated memory for a DXF TRACE
and all it's data fields.
EXIT_SUCCESS
when done, or EXIT_FAILURE
when an error occurred.trace | a pointer to the memory occupied by the DXF TRACE entity. |
Definition at line 627 of file trace.c.
References _, dxf_trace::dictionary_owner_hard, dxf_trace::dictionary_owner_soft, DXF_DEBUG_BEGIN, DXF_DEBUG_END, dxf_trace::layer, dxf_trace::linetype, and dxf_trace::next.
Referenced by dxf_trace_free_chain().
void dxf_trace_free_chain | ( | DxfTrace * | traces | ) |
Free the allocated memory for a chain of DXF TRACE
entities and all their data fields.
traces | a pointer to the chain of DXF TRACE entities. |
Definition at line 676 of file trace.c.
References _, DXF_DEBUG_BEGIN, DXF_DEBUG_END, dxf_trace_free(), and dxf_trace::next.