X-Git-Url: http://shamusworld.gotdns.org/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=src%2Ffileio.cpp;fp=src%2Ffileio.cpp;h=3ce447040014fe9ea7e53bb5d4be90bda16f0521;hb=41644f6a841b45cb6f1f7a96c93fd550f67a7974;hp=1b11902e37b672f1f6a72bd6dc443894acce5efd;hpb=d9f34cb7917e396a1df805687234d5473d82283b;p=architektonas diff --git a/src/fileio.cpp b/src/fileio.cpp index 1b11902..3ce4470 100644 --- a/src/fileio.cpp +++ b/src/fileio.cpp @@ -108,11 +108,8 @@ OTHER CONSIDERATIONS: - Need to figure out how to store the Layer list (should layer list be optional?) - Need to figure out how to store the Block list and blocks - */ -//enum ObjectTypeFile { OTFContainer, OTFContainerEnd, OTFLine, OTFCircle, OTFArc, -// OTFDimension, OTFPolygon, OTFText, OTFImage, OTFBlock, OTFEndOfFile }; enum ObjectTypeFile { OTFContainer, OTFContainerEnd, OTFObject, OTFEndOfFile }; // Instantiate class variables @@ -127,6 +124,12 @@ enum ObjectTypeFile { OTFContainer, OTFContainerEnd, OTFObject, OTFEndOfFile }; Container, otherwise it enumerates all objects within itself. */ fprintf(file, "ARCHITEKTONAS DRAWING V1.2\n"); + fprintf(file, "PROPERTIES 4\n"); + fprintf(file, "BASE_UNIT %i\n", c->baseUnit); + fprintf(file, "UNIT_STYLE %i\n", c->unitStyle); + fprintf(file, "DEC_PREC %i\n", c->decimalPrecision); + fprintf(file, "FRAC_PREC %i\n", c->fractionalPrecision); + fprintf(file, "LAYERS %i\n", Global::numLayers); for(int i=0; ibaseUnit)); + fscanf(file, "UNIT_STYLE %i\n", &(drawing->unitStyle)); + fscanf(file, "DEC_PREC %i\n", &(drawing->decimalPrecision)); + fscanf(file, "FRAC_PREC %i\n", &(drawing->fractionalPrecision)); + } + + // Load layer information next fscanf(file, "LAYERS %i\n", &Global::numLayers); for(int i=0; ilayer, obj->p[0].x, obj->p[0].y, obj->p[1].x, obj->p[1].y, ((Dimension *)obj)->subtype, ((Dimension *)obj)->offset); break; case OTSpline: