libDXF 0.0.1
A library with DXF related functions written in C.
|
Header file for a DXF Viewport symbol table entry (VPORT
).
More...
#include "global.h"
Go to the source code of this file.
Data Structures | |
struct | dxf_vport |
DXF definition of an AutoCAD viewport entity. More... | |
Typedefs | |
typedef struct dxf_vport | DxfVPort |
DXF definition of an AutoCAD viewport entity. | |
Functions | |
DxfVPort * | dxf_vport_new () |
Allocate memory for a DXF VPORT entity. | |
DxfVPort * | dxf_vport_init (DxfVPort *vport) |
Allocate memory and initialize data fields in a DXF VPORT entity. | |
DxfVPort * | dxf_vport_read (DxfFile *fp, DxfVPort *vport) |
Read data from a DXF file into an VPORT symbol table entry. | |
int | dxf_vport_write (DxfFile *fp, DxfVPort *vport) |
Write DXF output to a file for a DXF VPORT symbol table entry. | |
int | dxf_vport_free (DxfVPort *vport) |
Free the allocated memory for a DXF VPORT and all it's data fields. | |
void | dxf_vport_free_chain (DxfVPort *vports) |
Free the allocated memory for a chain of DXF VPORT symbol table and all their data fields. |
Header file for a DXF Viewport symbol table entry (VPORT
).
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 vport.h.
DXF definition of an AutoCAD viewport entity.
The VPORT table is unique in that it may contain several entries with the same name (indicating a multiple-viewport configuration).
The entries corresponding to the active viewport configuration all have the name *ACTIVE.
The first such entry describes the current viewport.
DxfVPort* dxf_vport_new | ( | ) |
Allocate memory for a DXF VPORT
entity.
Fill the memory contents with zeros.
Definition at line 56 of file vport.c.
References _, DXF_DEBUG_BEGIN, and DXF_DEBUG_END.
Referenced by dxf_vport_init(), and dxf_vport_read().
Allocate memory and initialize data fields in a DXF VPORT
entity.
NULL
when no memory was allocated, a pointer to the allocated memory when succesful.vport | a pointer to the DXF VPORT symbol table entry. |
Definition at line 100 of file vport.c.
References _, dxf_vport::back_plane_offset, dxf_vport::circle_zoom_percent, dxf_vport::dictionary_owner_hard, dxf_vport::dictionary_owner_soft, DXF_DEBUG_BEGIN, DXF_DEBUG_END, dxf_vport_new(), dxf_vport::fast_zoom_setting, dxf_vport::front_plane_offset, dxf_vport::grid_on, dxf_vport::id, dxf_vport::id_code, dxf_vport::lens_length, dxf_vport::next, dxf_vport::snap_isopair, dxf_vport::snap_on, dxf_vport::snap_rotation_angle, dxf_vport::snap_style, dxf_vport::standard_flag, dxf_vport::status_field, dxf_vport::UCSICON_setting, dxf_vport::view_height, dxf_vport::view_mode, dxf_vport::view_twist_angle, dxf_vport::viewport_aspect_ratio, dxf_vport::viewport_name, dxf_vport::x_center, dxf_vport::x_direction, dxf_vport::x_grid_spacing, dxf_vport::x_max, dxf_vport::x_min, dxf_vport::x_snap_base, dxf_vport::x_snap_spacing, dxf_vport::x_target, dxf_vport::y_center, dxf_vport::y_direction, dxf_vport::y_grid_spacing, dxf_vport::y_max, dxf_vport::y_min, dxf_vport::y_snap_base, dxf_vport::y_snap_spacing, dxf_vport::y_target, dxf_vport::z_direction, and dxf_vport::z_target.
Referenced by dxf_vport_read().
Read data from a DXF file into an VPORT
symbol table entry.
The last line read from file contained the string "VPORT".
Now follows some data for the VPORT
, to be terminated with a " 0" string announcing the following entity, or the end of the TABLE
section marker ENDTAB
.
While parsing the DXF file store data in vport
.
EXIT_SUCCESS
when done, or EXIT_FAILURE
when an error occurred.fp | DXF file pointer to an input file (or device). |
vport | a pointer to the DXF VPORT symbol table entry. |
Definition at line 191 of file vport.c.
References _, dxf_vport::back_plane_offset, dxf_vport::circle_zoom_percent, dxf_vport::dictionary_owner_hard, dxf_vport::dictionary_owner_soft, DXF_DEBUG_BEGIN, DXF_DEBUG_END, dxf_vport_init(), dxf_vport_new(), dxf_vport::fast_zoom_setting, dxf_file_struct::filename, dxf_file_struct::fp, dxf_vport::front_plane_offset, dxf_vport::grid_on, dxf_vport::id, dxf_vport::id_code, dxf_file_struct::line_number, dxf_vport::snap_isopair, dxf_vport::snap_on, dxf_vport::snap_rotation_angle, dxf_vport::snap_style, dxf_vport::standard_flag, dxf_vport::status_field, dxf_vport::UCSICON_setting, dxf_vport::view_height, dxf_vport::view_mode, dxf_vport::view_twist_angle, dxf_vport::viewport_aspect_ratio, dxf_vport::viewport_name, dxf_vport::x_center, dxf_vport::x_direction, dxf_vport::x_grid_spacing, dxf_vport::x_max, dxf_vport::x_min, dxf_vport::x_snap_base, dxf_vport::x_snap_spacing, dxf_vport::x_target, dxf_vport::y_center, dxf_vport::y_direction, dxf_vport::y_grid_spacing, dxf_vport::y_max, dxf_vport::y_min, dxf_vport::y_snap_base, dxf_vport::y_snap_spacing, dxf_vport::y_target, dxf_vport::z_direction, and dxf_vport::z_target.
Write DXF output to a file for a DXF VPORT
symbol table entry.
fp | DXF file pointer to an output file (or device). |
vport | a pointer to the DXF VPORT symbol table entry. |
Definition at line 554 of file vport.c.
References _, dxf_file_struct::acad_version_number, AutoCAD_13, AutoCAD_14, dxf_vport::back_plane_offset, dxf_vport::circle_zoom_percent, dxf_vport::dictionary_owner_hard, dxf_vport::dictionary_owner_soft, DXF_DEBUG_BEGIN, DXF_DEBUG_END, dxf_vport::fast_zoom_setting, dxf_file_struct::fp, dxf_vport::front_plane_offset, dxf_vport::grid_on, dxf_vport::id_code, dxf_vport::lens_length, dxf_vport::snap_isopair, dxf_vport::snap_on, dxf_vport::snap_rotation_angle, dxf_vport::snap_style, dxf_vport::standard_flag, dxf_vport::UCSICON_setting, dxf_vport::view_height, dxf_vport::view_mode, dxf_vport::view_twist_angle, dxf_vport::viewport_aspect_ratio, dxf_vport::viewport_name, dxf_vport::x_center, dxf_vport::x_direction, dxf_vport::x_grid_spacing, dxf_vport::x_max, dxf_vport::x_min, dxf_vport::x_snap_base, dxf_vport::x_snap_spacing, dxf_vport::x_target, dxf_vport::y_center, dxf_vport::y_direction, dxf_vport::y_grid_spacing, dxf_vport::y_max, dxf_vport::y_min, dxf_vport::y_snap_base, dxf_vport::y_snap_spacing, dxf_vport::y_target, dxf_vport::z_direction, and dxf_vport::z_target.
int dxf_vport_free | ( | DxfVPort * | vport | ) |
Free the allocated memory for a DXF VPORT
and all it's data fields.
EXIT_SUCCESS
when done, or EXIT_FAILURE
when an error occurred.vport | a pointer to the memory occupied by the DXF VPORT symbol table entry. |
Definition at line 694 of file vport.c.
References _, dxf_vport::dictionary_owner_hard, dxf_vport::dictionary_owner_soft, DXF_DEBUG_BEGIN, DXF_DEBUG_END, dxf_vport::next, and dxf_vport::viewport_name.
Referenced by dxf_vport_free_chain().
void dxf_vport_free_chain | ( | DxfVPort * | vports | ) |
Free the allocated memory for a chain of DXF VPORT
symbol table and all their data fields.
vports | a pointer to the chain of DXF VPORT symbol table entries. |
Definition at line 742 of file vport.c.
References _, DXF_DEBUG_BEGIN, DXF_DEBUG_END, dxf_vport_free(), and dxf_vport::next.