libDXF 0.0.1
A library with DXF related functions written in C.
|
Functions for a DXF View symbol table entry (VIEW
).
More...
#include "view.h"
Go to the source code of this file.
Functions | |
DxfView * | dxf_view_new () |
Allocate memory for a DXF VIEW . | |
DxfView * | dxf_view_init (DxfView *view) |
Allocate memory and initialize data fields in a DXF VIEW entity. | |
DxfView * | dxf_view_read (DxfFile *fp, DxfView *view) |
Read data from a DXF file into a DXF VIEW entity. | |
int | dxf_view_write (DxfFile *fp, DxfView *view) |
Write DXF output to a file for a DXF VIEW entity. | |
int | dxf_view_free (DxfView *view) |
Free the allocated memory for a DXF VIEW and all it's data fields. | |
void | dxf_view_free_chain (DxfView *views) |
Free the allocated memory for a chain of DXF VIEW symbol table and all their data fields. |
Functions for a DXF View symbol table entry (VIEW
).
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 view.c.
DxfView* dxf_view_new | ( | ) |
Allocate memory for a DXF VIEW
.
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 view.c.
References _, DXF_DEBUG_BEGIN, and DXF_DEBUG_END.
Referenced by dxf_view_init(), and dxf_view_read().
Allocate memory and initialize data fields in a DXF VIEW
entity.
NULL
when no memory was allocated, a pointer to the allocated memory when succesful.view | a pointer to the DXF VIEW symbol table entry. |
Definition at line 97 of file view.c.
References _, dxf_view::back_plane_offset, dxf_view::dictionary_owner_hard, dxf_view::dictionary_owner_soft, DXF_DEBUG_BEGIN, DXF_DEBUG_END, dxf_view_new(), dxf_view::flag, dxf_view::front_plane_offset, dxf_view::id_code, dxf_view::lens_length, dxf_view::next, dxf_view::view_height, dxf_view::view_mode, dxf_view::view_name, dxf_view::view_twist_angle, dxf_view::view_width, dxf_view::x_direction, dxf_view::x_target, dxf_view::x_view, dxf_view::y_direction, dxf_view::y_target, dxf_view::y_view, dxf_view::z_direction, and dxf_view::z_target.
Referenced by dxf_view_read().
Read data from a DXF file into a DXF VIEW
entity.
The last line read from file contained the string "VIEW".
Now follows some data for the VIEW
, to be terminated with a " 0" string announcing the following table record, or the end of the TABLE
section marker ENDTAB
.
While parsing the DXF file store data in view
.
view
.fp | DXF file pointer to an input file (or device). |
view | a pointer to the DXF VIEW symbol table entry. |
Definition at line 167 of file view.c.
References _, dxf_file_struct::acad_version_number, AutoCAD_13, dxf_view::back_plane_offset, dxf_view::dictionary_owner_hard, dxf_view::dictionary_owner_soft, DXF_DEBUG_BEGIN, DXF_DEBUG_END, dxf_view_init(), dxf_view_new(), dxf_file_struct::filename, dxf_view::flag, dxf_file_struct::fp, dxf_view::front_plane_offset, dxf_view::id_code, dxf_view::lens_length, dxf_file_struct::line_number, dxf_view::view_height, dxf_view::view_mode, dxf_view::view_name, dxf_view::view_twist_angle, dxf_view::view_width, dxf_view::x_direction, dxf_view::x_target, dxf_view::x_view, dxf_view::y_direction, dxf_view::y_target, dxf_view::y_view, dxf_view::z_direction, and dxf_view::z_target.
Write DXF output to a file for a DXF VIEW
entity.
EXIT_SUCCESS
when done, or EXIT_FAILURE
when an error occurred.fp | DXF file pointer to an output file (or device). |
view | a pointer to the DXF VIEW symbol table entry. |
Definition at line 406 of file view.c.
References _, dxf_file_struct::acad_version_number, AutoCAD_13, AutoCAD_14, dxf_view::back_plane_offset, dxf_view::dictionary_owner_hard, dxf_view::dictionary_owner_soft, DXF_DEBUG_BEGIN, DXF_DEBUG_END, dxf_view::flag, dxf_file_struct::fp, dxf_view::front_plane_offset, dxf_view::id_code, dxf_view::lens_length, dxf_view::view_height, dxf_view::view_mode, dxf_view::view_name, dxf_view::view_twist_angle, dxf_view::view_width, dxf_view::x_direction, dxf_view::x_target, dxf_view::x_view, dxf_view::y_direction, dxf_view::y_target, dxf_view::y_view, dxf_view::z_direction, and dxf_view::z_target.
int dxf_view_free | ( | DxfView * | view | ) |
Free the allocated memory for a DXF VIEW
and all it's data fields.
EXIT_SUCCESS
when done, or EXIT_FAILURE
when an error occurred.view | a pointer to the DXF VIEW symbol table entry. |
Definition at line 526 of file view.c.
References _, dxf_view::dictionary_owner_hard, dxf_view::dictionary_owner_soft, DXF_DEBUG_BEGIN, DXF_DEBUG_END, dxf_view::next, and dxf_view::view_name.
Referenced by dxf_view_free_chain().
void dxf_view_free_chain | ( | DxfView * | views | ) |
Free the allocated memory for a chain of DXF VIEW
symbol table and all their data fields.
views | a pointer to the chain of DXF VIEW symbol table entries. |
Definition at line 573 of file view.c.
References _, DXF_DEBUG_BEGIN, DXF_DEBUG_END, dxf_view_free(), and dxf_view::next.