libDXF 0.0.1
A library with DXF related functions written in C.
|
Functions for a DXF style entity (STYLE
).
More...
#include "style.h"
Go to the source code of this file.
Functions | |
DxfStyle * | dxf_style_new () |
Allocate memory for a DXF STYLE . | |
DxfStyle * | dxf_style_init (DxfStyle *style) |
Allocate memory and initialize data fields in a DXF STYLE entity. | |
DxfStyle * | dxf_style_read (DxfFile *fp, DxfStyle *style) |
Read data from a DXF file into a DXF STYLE entity. | |
int | dxf_style_write (DxfFile *fp, DxfStyle *style) |
Write DXF output for a DXF STYLE entity. | |
int | dxf_style_free (DxfStyle *style) |
Free the allocated memory for a DXF STYLE and all it's data fields. | |
void | dxf_style_free_chain (DxfStyle *styles) |
Free the allocated memory for a chain of DXF STYLE symbol table entries and all their data fields. | |
int | dxf_style_is_shape_file (DxfStyle *style) |
Test if a shape file should be loaded. | |
int | dxf_style_is_text_vertical (DxfStyle *style) |
Test if a shape text is vertically oriented. | |
int | dxf_style_is_xreferenced (DxfStyle *style) |
Test if style is externally dependent on an xref. | |
int | dxf_style_is_xresolved (DxfStyle *style) |
Test if style is externally dependent on a xref and has been successfully resolved. | |
int | dxf_style_is_referenced (DxfStyle *style) |
Test if style is internally referenced by an entity. |
Functions for a DXF style entity (STYLE
).
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 style.c.
DxfStyle* dxf_style_new | ( | ) |
Allocate memory for a DXF STYLE
.
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 style.c.
References _, DXF_DEBUG_BEGIN, and DXF_DEBUG_END.
Referenced by dxf_style_init(), and dxf_style_read().
Allocate memory and initialize data fields in a DXF STYLE
entity.
NULL
when no memory was allocated, a pointer to the allocated memory when succesful.style | a pointer to the DXF STYLE symbol table entry. |
Definition at line 97 of file style.c.
References _, dxf_style::big_font_filename, DXF_DEBUG_BEGIN, DXF_DEBUG_END, dxf_style_new(), dxf_style::flag, dxf_style::height, dxf_style::id_code, dxf_style::last_height, dxf_style::next, dxf_style::oblique_angle, dxf_style::primary_font_filename, dxf_style::style_name, dxf_style::text_generation_flag, and dxf_style::width.
Referenced by dxf_style_read().
Read data from a DXF file into a DXF STYLE
entity.
The last line read from file contained the string "STYLE".
Now follows some data for the STYLE
, to be terminated with a " 0" string announcing the following entity, or the end of the TABLES
section marker ENDTAB
.
While parsing the DXF file store data in style
.
style
.fp | DXF file pointer to an input file (or device). |
style | a pointer to the DXF STYLE symbol table entry. |
Definition at line 157 of file style.c.
References _, dxf_file_struct::acad_version_number, AutoCAD_13, dxf_style::big_font_filename, dxf_style::dictionary_owner_hard, dxf_style::dictionary_owner_soft, DXF_DEBUG_BEGIN, DXF_DEBUG_END, dxf_style_init(), dxf_style_new(), dxf_file_struct::filename, dxf_style::flag, dxf_file_struct::fp, dxf_style::height, dxf_style::id_code, dxf_style::last_height, dxf_file_struct::line_number, dxf_style::oblique_angle, dxf_style::primary_font_filename, dxf_style::style_name, dxf_style::text_generation_flag, and dxf_style::width.
Write DXF output for a DXF STYLE
entity.
EXIT_SUCCESS
when done, or EXIT_FAILURE
when an error occurred.fp | DXF file pointer to an output file (or device). |
style | a pointer to the DXF STYLE symbol table entry. |
Definition at line 352 of file style.c.
References _, dxf_file_struct::acad_version_number, AutoCAD_13, AutoCAD_14, dxf_style::big_font_filename, dxf_style::dictionary_owner_hard, dxf_style::dictionary_owner_soft, DXF_DEBUG_BEGIN, DXF_DEBUG_END, dxf_style::flag, dxf_file_struct::fp, dxf_style::height, dxf_style::id_code, dxf_style::last_height, dxf_style::oblique_angle, dxf_style::primary_font_filename, dxf_style::style_name, dxf_style::text_generation_flag, and dxf_style::width.
int dxf_style_free | ( | DxfStyle * | style | ) |
Free the allocated memory for a DXF STYLE
and all it's data fields.
EXIT_SUCCESS
when done, or EXIT_FAILURE
when an error occurred.style | a pointer to the memory occupied by the DXF STYLE symbol table entry. |
Definition at line 451 of file style.c.
References _, dxf_style::big_font_filename, DXF_DEBUG_BEGIN, DXF_DEBUG_END, dxf_style::next, dxf_style::primary_font_filename, and dxf_style::style_name.
Referenced by dxf_style_free_chain().
void dxf_style_free_chain | ( | DxfStyle * | styles | ) |
Free the allocated memory for a chain of DXF STYLE
symbol table entries and all their data fields.
styles | a pointer to the chain of DXF STYLE symbol table entries. |
Definition at line 499 of file style.c.
References _, DXF_DEBUG_BEGIN, DXF_DEBUG_END, dxf_style_free(), and dxf_style::next.
int dxf_style_is_shape_file | ( | DxfStyle * | style | ) |
Test if a shape file should be loaded.
TRUE
when a shape file should be loaded, or FALSE
when not, or (-1) when an error occured.style | a pointer to the DXF STYLE symbol table entry. |
Definition at line 540 of file style.c.
References _, DXF_CHECK_BIT, DXF_DEBUG_BEGIN, DXF_DEBUG_END, FALSE, and dxf_style::flag.
int dxf_style_is_text_vertical | ( | DxfStyle * | style | ) |
Test if a shape text is vertically oriented.
TRUE
when vertical oriented, or FALSE
when not vertically oriented, or (-1) when an error occured.style | a pointer to the DXF STYLE symbol table entry. |
Definition at line 581 of file style.c.
References _, DXF_CHECK_BIT, DXF_DEBUG_BEGIN, DXF_DEBUG_END, FALSE, and dxf_style::flag.
int dxf_style_is_xreferenced | ( | DxfStyle * | style | ) |
Test if style is externally dependent on an xref.
TRUE
when style is externally dependent on an xref, or FALSE
when style is not externally dependent on an xref, or (-1) when an error occured.style | a pointer to the DXF STYLE symbol table entry. |
Definition at line 622 of file style.c.
References _, DXF_CHECK_BIT, DXF_DEBUG_BEGIN, DXF_DEBUG_END, FALSE, and dxf_style::flag.
int dxf_style_is_xresolved | ( | DxfStyle * | style | ) |
Test if style is externally dependent on a xref and has been successfully resolved.
TRUE
when style is externally dependent on a xref and has been successfully resolved, or FALSE
when style is not externally dependent on a xref and has not been successfully resolved, or (-1) when an error occured.style | a pointer to the DXF STYLE symbol table entry. |
Definition at line 665 of file style.c.
References _, DXF_CHECK_BIT, DXF_DEBUG_BEGIN, DXF_DEBUG_END, FALSE, and dxf_style::flag.
int dxf_style_is_referenced | ( | DxfStyle * | style | ) |
Test if style is internally referenced by an entity.
TRUE
when style is internally referenced by an entity, or FALSE
when style is not internally referenced by an entity, or (-1) when an error occured.style | a pointer to the DXF STYLE symbol table entry. |
Definition at line 707 of file style.c.
References _, DXF_CHECK_BIT, DXF_DEBUG_BEGIN, DXF_DEBUG_END, FALSE, and dxf_style::flag.