libDXF 0.0.1
A library with DXF related functions written in C.
|
Functions for a DXF thumbnail (THUMBNAIL
).
More...
#include "thumbnail.h"
Go to the source code of this file.
Functions | |
DxfThumbnail * | dxf_thumbnail_new () |
Allocate memory for a DXF THUMBNAILIMAGE . | |
DxfThumbnail * | dxf_thumbnail_init (DxfThumbnail *thumbnail) |
Allocate memory and initialize data fields in a DXF THUMBNAILIMAGE entity. | |
DxfThumbnail * | dxf_thumbnail_read (DxfFile *fp, DxfThumbnail *thumbnail) |
Read data from a DXF file into a DXF THUMBNAILIMAGE entity. | |
int | dxf_thumbnail_write (DxfFile *fp, DxfThumbnail *thumbnail) |
Write a thumbnail to a DXF file. | |
int | dxf_thumbnail_free (DxfThumbnail *thumbnail) |
Free the allocated memory for a DXF THUMBNAILIMAGE and all it's data fields. |
Functions for a DXF thumbnail (THUMBNAIL
).
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 thumbnail.c.
DxfThumbnail* dxf_thumbnail_new | ( | ) |
Allocate memory for a DXF THUMBNAILIMAGE
.
Fill the memory contents with zeros.
NULL
when no memory was allocated, a pointer to the allocated memory when succesful.Definition at line 69 of file thumbnail.c.
References _, DXF_DEBUG_BEGIN, and DXF_DEBUG_END.
Referenced by dxf_thumbnail_init(), and dxf_thumbnail_read().
DxfThumbnail* dxf_thumbnail_init | ( | DxfThumbnail * | thumbnail | ) |
Allocate memory and initialize data fields in a DXF THUMBNAILIMAGE
entity.
NULL
when no memory was allocated, a pointer to the allocated memory when succesful.thumbnail | DXF thumbnailimage entity. |
Definition at line 126 of file thumbnail.c.
References _, DXF_DEBUG_BEGIN, DXF_DEBUG_END, DXF_MAX_PARAM, dxf_thumbnail_new(), dxf_thumbnail::number_of_bytes, and dxf_thumbnail::preview_image_data.
Referenced by dxf_drawing_init(), and dxf_thumbnail_read().
DxfThumbnail* dxf_thumbnail_read | ( | DxfFile * | fp, |
DxfThumbnail * | thumbnail | ||
) |
Read data from a DXF file into a DXF THUMBNAILIMAGE
entity.
The last line read from file contained the string "THUMBNAILIMAGE".
Now follows some data for the THUMBNAILIMAGE
, 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 thumbnail
.
thumbnail
.fp | DXF file pointer to an input file (or device). |
thumbnail | DXF thumbnailimage entity. |
Definition at line 195 of file thumbnail.c.
References _, dxf_file_struct::acad_version_number, AutoCAD_2000, DXF_DEBUG_BEGIN, DXF_DEBUG_END, dxf_thumbnail_init(), dxf_thumbnail_new(), dxf_file_struct::filename, dxf_file_struct::fp, dxf_file_struct::line_number, dxf_thumbnail::number_of_bytes, and dxf_thumbnail::preview_image_data.
int dxf_thumbnail_write | ( | DxfFile * | fp, |
DxfThumbnail * | thumbnail | ||
) |
Write a thumbnail to a DXF file.
fp | DXF file pointer to an output file (or device). |
thumbnail | the thumbnail to write to the output file. |
Definition at line 319 of file thumbnail.c.
References _, dxf_file_struct::acad_version_number, AutoCAD_2000, DXF_DEBUG_BEGIN, DXF_DEBUG_END, dxf_file_struct::fp, dxf_thumbnail::number_of_bytes, and dxf_thumbnail::preview_image_data.
int dxf_thumbnail_free | ( | DxfThumbnail * | thumbnail | ) |
Free the allocated memory for a DXF THUMBNAILIMAGE
and all it's data fields.
EXIT_SUCCESS
when done, or EXIT_FAILURE
when an error occurred.thumbnail | Pointer to the memory occupied by the DXF THUMBNAILIMAGE entity. |
Definition at line 412 of file thumbnail.c.
References _, DXF_DEBUG_BEGIN, DXF_DEBUG_END, DXF_MAX_PARAM, and dxf_thumbnail::preview_image_data.
Referenced by dxf_drawing_free().