libDXF 0.0.1
A library with DXF related functions written in C.
|
Header file for a DXF xline entity (XLINE
).
More...
#include "global.h"
Go to the source code of this file.
Data Structures | |
struct | dxf_xline |
DXF definition of an AutoCAD xline entity. More... | |
Typedefs | |
typedef struct dxf_xline | DxfXLine |
DXF definition of an AutoCAD xline entity. | |
Functions | |
DxfXLine * | dxf_xline_new () |
Allocate memory for a DxfXLine . | |
DxfXLine * | dxf_xline_init (DxfXLine *xline) |
Allocate memory and initialize data fields in an XLINE entity. | |
DxfXLine * | dxf_xline_read (DxfFile *fp, DxfXLine *xline) |
Read data from a DXF file into a DXF XLINE entity. | |
int | dxf_xline_write (DxfFile *fp, DxfXLine *xline) |
Write DXF output to fp for a DXF XLINE entity. | |
int | dxf_xline_free (DxfXLine *xline) |
Free the allocated memory for a DXF XLINE and all it's data fields. | |
void | dxf_xline_free_chain (DxfXLine *xlines) |
Free the allocated memory for a chain of DXF XLINE entities and all their data fields. |
Header file for a DXF xline entity (XLINE
).
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 xline.h.
DXF definition of an AutoCAD xline entity.
DxfXLine* dxf_xline_new | ( | ) |
Allocate memory for a DxfXLine
.
Fill the memory contents with zeros.
NULL
when no memory was allocated, a pointer to the allocated memory when succesful.Definition at line 53 of file xline.c.
References _, DXF_DEBUG_BEGIN, and DXF_DEBUG_END.
Referenced by dxf_xline_init(), and dxf_xline_read().
Allocate memory and initialize data fields in an XLINE
entity.
NULL
when no memory was allocated, a pointer to the allocated memory when succesful.xline | a pointer to the DXF XLINE entity. |
Definition at line 96 of file xline.c.
References _, dxf_xline::color, dxf_xline::dictionary_owner_hard, dxf_xline::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_xline_new(), dxf_xline::elevation, dxf_xline::id_code, dxf_xline::layer, dxf_xline::linetype, dxf_xline::linetype_scale, dxf_xline::next, dxf_xline::paperspace, dxf_xline::thickness, dxf_xline::visibility, dxf_xline::x0, dxf_xline::x1, dxf_xline::y0, dxf_xline::y1, dxf_xline::z0, and dxf_xline::z1.
Referenced by dxf_xline_read().
Read data from a DXF file into a DXF XLINE
entity.
The last line read from file contained the string "XLINE".
Now follows some data for the XLINE
, 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 xline
.
xline
.fp | DXF file pointer to an input file (or device). |
xline | a pointer to the DXF XLINE entity. |
Definition at line 163 of file xline.c.
References _, dxf_file_struct::acad_version_number, AutoCAD_11, AutoCAD_13, dxf_xline::color, dxf_xline::dictionary_owner_hard, dxf_xline::dictionary_owner_soft, DXF_DEBUG_BEGIN, DXF_DEBUG_END, DXF_DEFAULT_LAYER, DXF_DEFAULT_LINETYPE, dxf_xline_init(), dxf_xline_new(), dxf_xline::elevation, dxf_file_struct::filename, dxf_file_struct::fp, dxf_xline::id_code, dxf_xline::layer, dxf_file_struct::line_number, dxf_xline::linetype, dxf_xline::linetype_scale, dxf_xline::paperspace, dxf_xline::thickness, dxf_xline::visibility, dxf_xline::x0, dxf_xline::x1, dxf_xline::y0, dxf_xline::y1, dxf_xline::z0, and dxf_xline::z1.
Write DXF output to fp for a DXF XLINE
entity.
EXIT_SUCCESS
when done, or EXIT_FAILURE
when an error occured.fp | DXF file pointer to an output file (or device). |
xline | a pointer to the DXF XLINE entity. |
Definition at line 387 of file xline.c.
References _, dxf_file_struct::acad_version_number, AutoCAD_11, AutoCAD_13, AutoCAD_14, dxf_xline::color, dxf_xline::dictionary_owner_hard, dxf_xline::dictionary_owner_soft, DXF_COLOR_BYLAYER, DXF_DEBUG_BEGIN, DXF_DEBUG_END, DXF_DEFAULT_LAYER, DXF_DEFAULT_LINETYPE, dxf_entity_skip(), DXF_FLATLAND, DXF_PAPERSPACE, dxf_xline::elevation, dxf_file_struct::fp, dxf_xline::id_code, dxf_xline::layer, dxf_xline::linetype, dxf_xline::linetype_scale, dxf_xline::paperspace, dxf_xline::thickness, dxf_xline::visibility, dxf_xline::x0, dxf_xline::x1, dxf_xline::y0, dxf_xline::y1, dxf_xline::z0, and dxf_xline::z1.
int dxf_xline_free | ( | DxfXLine * | xline | ) |
Free the allocated memory for a DXF XLINE
and all it's data fields.
EXIT_SUCCESS
when done, or EXIT_FAILURE
when an error occurred.xline | a pointer to the memory occupied by the DXF XLINE entity. |
Definition at line 539 of file xline.c.
References _, dxf_xline::dictionary_owner_hard, dxf_xline::dictionary_owner_soft, DXF_DEBUG_BEGIN, DXF_DEBUG_END, dxf_xline::layer, dxf_xline::linetype, and dxf_xline::next.
Referenced by dxf_xline_free_chain().
void dxf_xline_free_chain | ( | DxfXLine * | xlines | ) |
Free the allocated memory for a chain of DXF XLINE
entities and all their data fields.
xlines | a pointer to the chain of DXF XLINE entities. |
Definition at line 588 of file xline.c.
References _, DXF_DEBUG_BEGIN, DXF_DEBUG_END, dxf_xline_free(), and dxf_xline::next.