File tree 2 files changed +21
-4
lines changed
2 files changed +21
-4
lines changed Original file line number Diff line number Diff line change @@ -45,8 +45,24 @@ int QgsDxfExport::writeToFile( QIODevice* d )
45
45
return 0 ;
46
46
}
47
47
48
- int QgsDxfExport::writeHeader ( QTextStream& stream )
48
+ void QgsDxfExport::writeHeader ( QTextStream& stream )
49
49
{
50
- stream << " Hello, dxf!" ;
51
- return 0 ; // soon...
50
+ stream << " 999\n " ;
51
+ stream << " DXF created from QGIS\n " ;
52
+ stream << " 0\n " ;
53
+ stream << " SECTION\n " ;
54
+ stream << " 2\n " ;
55
+ stream << " HEADER\n " ;
56
+ stream << " 9\n " ;
57
+ stream << " $LTSCALE\n " ;
58
+ stream << " 40\n " ;
59
+ stream << " 1\n " ;
60
+ stream << " 0\n " ;
61
+ stream << " ENDSEC\n " ;
62
+ }
63
+
64
+ void QgsDxfExport::writeEndFile ( QTextStream& stream )
65
+ {
66
+ stream << " 0\n " ;
67
+ stream << " ENDSEC\n " ;
52
68
}
Original file line number Diff line number Diff line change @@ -37,7 +37,8 @@ class QgsDxfExport
37
37
38
38
QList< QgsMapLayer* > mLayers ;
39
39
40
- int writeHeader ( QTextStream& stream );
40
+ void writeHeader ( QTextStream& stream );
41
+ void writeEndFile ( QTextStream& stream );
41
42
// collect styles
42
43
// writeEntities
43
44
You can’t perform that action at this time.
0 commit comments