1 /*****************************************************************************/
2 /* LibreDWG - free implementation of the DWG file format */
3 /* */
4 /* Copyright (C) 2018-2019 Free Software Foundation, Inc. */
5 /* */
6 /* This library is free software, licensed under the terms of the GNU */
7 /* General Public License as published by the Free Software Foundation, */
8 /* either version 3 of the License, or (at your option) any later version. */
9 /* You should have received a copy of the GNU General Public License */
10 /* along with this program. If not, see <http://www.gnu.org/licenses/>. */
11 /*****************************************************************************/
12
13 /*
14 * out_dxf.h: write dwg as DXF (Ascii or Binary)
15 * written by Reini Urban
16 */
17
18 #ifndef OUT_DXF_H
19 #define OUT_DXF_H
20
21 #include "dwg.h"
22 #include "bits.h"
23
24 #ifdef IN_DXF_H
25 # error in_dxf.h must be included after out_dxf.h because of FORMAT_BD
26 #endif
27 #ifndef DXF_PRECISION
28 # define DXF_PRECISION 16
29 #endif
30
31 #define DXF_FORMAT_FLT "%0." _XSTR (DXF_PRECISION) "G"
32 #define DXF_FLT_MAXLEN 18
33
34 const char *dxf_format (int code) RETURNS_NONNULL;
35 const char *dxf_codepage (BITCODE_RS code, Dwg_Data *dwg) RETURNS_NONNULL;
36 int dxf_is_sorted_INSERT (const Dwg_Object *restrict obj);
37 int dxf_is_sorted_POLYLINE (const Dwg_Object *restrict obj);
38 int dxf_validate_DICTIONARY (Dwg_Object *obj);
39 bool dxf_has_STYLE_eed (Bit_Chain *restrict dat,
40 const Dwg_Object_Object *restrict obj);
41 bool dxf_has_xrefdep_vertbar (Bit_Chain *restrict dat, const char *name);
42 bool dxf_is_xrefdep_name (Bit_Chain *restrict dat, const char *name);
43
44 EXPORT int dwg_write_dxf (Bit_Chain *dat, Dwg_Data *dwg) __nonnull_all;
45 EXPORT int dwg_write_dxfb (Bit_Chain *dat, Dwg_Data *dwg) __nonnull_all;
46
47 #endif