libDXF 0.0.1
A library with DXF related functions written in C.
|
Functions for a DXF binary graphics data object. More...
#include "binary_graphics_data.h"
Go to the source code of this file.
Functions | |
DxfBinaryGraphicsData * | dxf_binary_graphics_data_new () |
Allocate memory for a binary graphics data object. | |
DxfBinaryGraphicsData * | dxf_binary_graphics_data_init (DxfBinaryGraphicsData *data) |
Allocate memory and initialize data fields in a binary graphics data entity. | |
int | dxf_binary_graphics_data_write (DxfFile *fp, DxfBinaryGraphicsData *data) |
Write DXF output to fp for a binary graphics data object. | |
int | dxf_binary_graphics_data_free (DxfBinaryGraphicsData *data) |
Free the allocated memory for a binary graphics data object and all it's data fields. | |
void | dxf_binary_graphics_data_free_chain (DxfBinaryGraphicsData *data) |
Free the allocated memory for a chain of binary graphics data objects and all their data fields. | |
char * | dxf_binary_graphics_data_get_data_line (DxfBinaryGraphicsData *data) |
Get the data_line from a binary graphics data object. | |
DxfBinaryGraphicsData * | dxf_binary_graphics_data_set_data_line (DxfBinaryGraphicsData *data, char *data_line) |
Set the data_line for a binary graphics data object. | |
int | dxf_binary_graphics_data_get_length (DxfBinaryGraphicsData *data) |
Get the length from a binary graphics data object. | |
DxfBinaryGraphicsData * | dxf_binary_graphics_data_set_length (DxfBinaryGraphicsData *data, int length) |
Set the length for a binary graphics data object. | |
DxfBinaryGraphicsData * | dxf_binary_graphics_data_get_next (DxfBinaryGraphicsData *data) |
Get the pointer to the next binary graphics data object from a binary graphics data object. | |
DxfBinaryGraphicsData * | dxf_binary_graphics_data_set_next (DxfBinaryGraphicsData *data, DxfBinaryGraphicsData *next) |
Set the pointer to the next binary graphics data for a binary graphics data entity. | |
DxfBinaryGraphicsData * | dxf_binary_graphics_data_get_last (DxfBinaryGraphicsData *data) |
Get the pointer to the last binary graphics data object from a linked list of binary graphics data objects. |
Functions for a DXF binary graphics data object.
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 binary_graphics_data.c.
DxfBinaryGraphicsData* dxf_binary_graphics_data_new | ( | ) |
Allocate memory for a binary graphics data object.
Fill the memory contents with zeros.
Definition at line 44 of file binary_graphics_data.c.
References _, DXF_DEBUG_BEGIN, and DXF_DEBUG_END.
Referenced by dxf_3dface_init(), dxf_3dline_init(), dxf_3dsolid_init(), dxf_acad_proxy_entity_init(), dxf_arc_init(), dxf_attdef_init(), dxf_attrib_init(), dxf_binary_graphics_data_init(), dxf_circle_init(), dxf_donut_init(), dxf_ellipse_init(), dxf_image_init(), dxf_insert_init(), dxf_line_init(), dxf_mline_init(), dxf_polyline_init(), dxf_ray_init(), dxf_seqend_init(), dxf_shape_init(), and dxf_solid_init().
DxfBinaryGraphicsData* dxf_binary_graphics_data_init | ( | DxfBinaryGraphicsData * | data | ) |
Allocate memory and initialize data fields in a binary graphics data entity.
NULL
when no memory was allocated, a pointer to the allocated memory when succesful. data | a pointer to the binary graphics data object. |
Definition at line 82 of file binary_graphics_data.c.
References _, dxf_binary_graphics_data_new(), dxf_binary_graphics_data_set_data_line(), dxf_binary_graphics_data_set_length(), dxf_binary_graphics_data_set_next(), DXF_DEBUG_BEGIN, and DXF_DEBUG_END.
Referenced by dxf_3dface_init(), dxf_3dface_read(), dxf_3dline_init(), dxf_3dline_read(), dxf_3dsolid_init(), dxf_3dsolid_read(), dxf_acad_proxy_entity_init(), dxf_acad_proxy_entity_read(), dxf_arc_init(), dxf_attdef_init(), dxf_attrib_init(), dxf_body_init(), dxf_circle_init(), dxf_hatch_init(), dxf_helix_init(), dxf_helix_read(), dxf_image_init(), dxf_insert_init(), dxf_line_read(), dxf_mline_init(), dxf_ray_init(), dxf_seqend_init(), dxf_seqend_read(), dxf_shape_init(), dxf_shape_read(), dxf_solid_init(), dxf_solid_read(), dxf_spline_init(), and dxf_spline_read().
int dxf_binary_graphics_data_write | ( | DxfFile * | fp, |
DxfBinaryGraphicsData * | data | ||
) |
Write DXF output to fp for a binary graphics data object.
EXIT_SUCCESS
when done, or EXIT_FAILURE
when an error occurred. fp | file pointer to output file (or device). |
data | a pointer to the binary graphics data object. |
Definition at line 123 of file binary_graphics_data.c.
References _, dxf_binary_graphics_data_struct::data_line, DXF_DEBUG_BEGIN, DXF_DEBUG_END, and dxf_file_struct::fp.
int dxf_binary_graphics_data_free | ( | DxfBinaryGraphicsData * | data | ) |
Free the allocated memory for a binary graphics data object and all it's data fields.
EXIT_SUCCESS
when done, or EXIT_FAILURE
when an error occurred. data | Pointer to the memory occupied by the binary graphics data entity. |
Definition at line 159 of file binary_graphics_data.c.
References _, dxf_binary_graphics_data_struct::data_line, DXF_DEBUG_BEGIN, DXF_DEBUG_END, and dxf_binary_graphics_data_struct::next.
Referenced by dxf_binary_graphics_data_free_chain(), dxf_mline_free(), and dxf_region_free().
void dxf_binary_graphics_data_free_chain | ( | DxfBinaryGraphicsData * | data | ) |
Free the allocated memory for a chain of binary graphics data objects and all their data fields.
data | pointer to the chain of DXF binary graphics data objects. |
Definition at line 199 of file binary_graphics_data.c.
References _, dxf_binary_graphics_data_free(), DXF_DEBUG_BEGIN, DXF_DEBUG_END, and dxf_binary_graphics_data_struct::next.
Referenced by dxf_3dface_free(), dxf_3dline_free(), dxf_3dsolid_free(), dxf_acad_proxy_entity_free(), dxf_attrib_free(), dxf_hatch_free(), dxf_helix_free(), dxf_image_free(), dxf_insert_free(), dxf_line_free(), dxf_polyline_free(), dxf_seqend_free(), dxf_shape_free(), and dxf_spline_free().
char* dxf_binary_graphics_data_get_data_line | ( | DxfBinaryGraphicsData * | data | ) |
Get the data_line from a binary graphics data object.
NULL
when an error occurred. data | a pointer to a binary graphics data object. |
Definition at line 234 of file binary_graphics_data.c.
References _, dxf_binary_graphics_data_struct::data_line, DXF_DEBUG_BEGIN, and DXF_DEBUG_END.
Referenced by dxf_3dface_write(), dxf_3dline_write(), dxf_3dsolid_write(), dxf_acad_proxy_entity_write(), dxf_line_write(), dxf_mline_write(), dxf_seqend_write(), dxf_shape_write(), and dxf_solid_write().
DxfBinaryGraphicsData* dxf_binary_graphics_data_set_data_line | ( | DxfBinaryGraphicsData * | data, |
char * | data_line | ||
) |
Set the data_line for a binary graphics data object.
data | a pointer to a binary graphics data object. |
data_line | a string containing the data_line for the entity. |
Definition at line 269 of file binary_graphics_data.c.
References _, dxf_binary_graphics_data_struct::data_line, DXF_DEBUG_BEGIN, and DXF_DEBUG_END.
Referenced by dxf_binary_graphics_data_init().
int dxf_binary_graphics_data_get_length | ( | DxfBinaryGraphicsData * | data | ) |
Get the length
from a binary graphics data object.
length
. data | a pointer to a binary graphics data object. |
Definition at line 309 of file binary_graphics_data.c.
References _, DXF_DEBUG_BEGIN, DXF_DEBUG_END, and dxf_binary_graphics_data_struct::length.
DxfBinaryGraphicsData* dxf_binary_graphics_data_set_length | ( | DxfBinaryGraphicsData * | data, |
int | length | ||
) |
Set the length
for a binary graphics data object.
data
when sucessful, NULL
when an error occurred. data | a pointer to a binary graphics data object. |
length | Length to be set for the entity. |
Definition at line 347 of file binary_graphics_data.c.
References _, DXF_DEBUG_BEGIN, DXF_DEBUG_END, and dxf_binary_graphics_data_struct::length.
Referenced by dxf_binary_graphics_data_init().
DxfBinaryGraphicsData* dxf_binary_graphics_data_get_next | ( | DxfBinaryGraphicsData * | data | ) |
Get the pointer to the next binary graphics data object from a binary graphics data object.
data | a pointer to a binary graphics data object. |
Definition at line 390 of file binary_graphics_data.c.
References _, DXF_DEBUG_BEGIN, DXF_DEBUG_END, and dxf_binary_graphics_data_struct::next.
Referenced by dxf_3dface_write(), dxf_3dline_write(), dxf_3dsolid_write(), dxf_acad_proxy_entity_write(), dxf_hatch_write(), dxf_helix_write(), dxf_line_write(), dxf_mline_write(), dxf_seqend_write(), dxf_shape_write(), dxf_solid_write(), and dxf_spline_write().
DxfBinaryGraphicsData* dxf_binary_graphics_data_set_next | ( | DxfBinaryGraphicsData * | data, |
DxfBinaryGraphicsData * | next | ||
) |
Set the pointer to the next binary graphics data for a binary graphics data entity.
data | a pointer to a binary graphics data object. |
next | a pointer to the next binary graphics data for the entity. |
Definition at line 426 of file binary_graphics_data.c.
References _, DXF_DEBUG_BEGIN, DXF_DEBUG_END, and dxf_binary_graphics_data_struct::next.
Referenced by dxf_binary_graphics_data_init().
DxfBinaryGraphicsData* dxf_binary_graphics_data_get_last | ( | DxfBinaryGraphicsData * | data | ) |
Get the pointer to the last binary graphics data object from a linked list of binary graphics data objects.
data | a pointer to a binary graphics data object. |
Definition at line 470 of file binary_graphics_data.c.
References _, DXF_DEBUG_BEGIN, DXF_DEBUG_END, and dxf_binary_graphics_data_struct::next.