libDXF 0.0.1
A library with DXF related functions written in C.
Data Structures | Typedefs | Functions

binary_graphics_data.h File Reference

Header file for a DXF binary graphics data object. More...

#include "global.h"
Include dependency graph for binary_graphics_data.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Data Structures

struct  dxf_binary_graphics_data_struct
 DXF definition of an AutoCAD binary graphics data object. More...

Typedefs

typedef struct
dxf_binary_graphics_data_struct 
DxfBinaryGraphicsData
 DXF definition of an AutoCAD binary graphics data object.

Functions

DxfBinaryGraphicsDatadxf_binary_graphics_data_new ()
 Allocate memory for a binary graphics data object.
DxfBinaryGraphicsDatadxf_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.
DxfBinaryGraphicsDatadxf_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.
DxfBinaryGraphicsDatadxf_binary_graphics_data_set_length (DxfBinaryGraphicsData *data, int length)
 Set the length for a binary graphics data object.
DxfBinaryGraphicsDatadxf_binary_graphics_data_get_next (DxfBinaryGraphicsData *data)
 Get the pointer to the next binary graphics data object from a binary graphics data object.
DxfBinaryGraphicsDatadxf_binary_graphics_data_set_next (DxfBinaryGraphicsData *data, DxfBinaryGraphicsData *next)
 Set the pointer to the next binary graphics data for a binary graphics data entity.
DxfBinaryGraphicsDatadxf_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.

Detailed Description

Header file for a DXF binary graphics data object.

Author:
Copyright (C) 2016 by Bert Timmerman <bert.timmerman@xs4all.nl>.

Copyright Notices.


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.h.


Typedef Documentation

DXF definition of an AutoCAD binary graphics data object.


Function Documentation

DxfBinaryGraphicsData* dxf_binary_graphics_data_new ( )
DxfBinaryGraphicsData* dxf_binary_graphics_data_init ( DxfBinaryGraphicsData data)
int dxf_binary_graphics_data_write ( DxfFile fp,
DxfBinaryGraphicsData data 
)

Write DXF output to fp for a binary graphics data object.

Returns:
EXIT_SUCCESS when done, or EXIT_FAILURE when an error occurred.
Parameters:
fpfile pointer to output file (or device).
dataa 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.

Returns:
EXIT_SUCCESS when done, or EXIT_FAILURE when an error occurred.
Parameters:
dataPointer 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.

Parameters:
datapointer 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().

Here is the call graph for this function:

char* dxf_binary_graphics_data_get_data_line ( DxfBinaryGraphicsData data)

Get the data_line from a binary graphics data object.

Returns:
data_line when sucessful, NULL when an error occurred.
Parameters:
dataa 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.

Parameters:
dataa pointer to a binary graphics data object.
data_linea 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.

Returns:
length.
Parameters:
dataa 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.

Returns:
a pointer to data when sucessful, NULL when an error occurred.
Parameters:
dataa pointer to a binary graphics data object.
lengthLength 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.

Returns:
pointer to the next binary graphics data object.
Warning:
No checks are performed on the returned pointer.
Parameters:
dataa 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.

Parameters:
dataa pointer to a binary graphics data object.
nexta 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.

Returns:
pointer to the last binary graphics data object.
Warning:
No checks are performed on the returned pointer.
Parameters:
dataa 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.