[Igarden-commit] Garden/source/LayoutDB GardenPlot.h, 1.19.2.1, 1.19.2.2 Layout.cpp, 1.27.2.4, 1.27
Status: Beta
Brought to you by:
jlbedell
|
From: Jeffrey B. <jlb...@us...> - 2006-12-07 01:23:05
|
Update of /cvsroot/igarden/Garden/source/LayoutDB In directory sc8-pr-cvs2.sourceforge.net:/tmp/cvs-serv25830 Modified Files: Tag: Release_branch_v1 GardenPlot.h Layout.cpp GardenPlot.cpp Layout.h Log Message: Save and restore aerial view pictures (with preference) Index: Layout.h =================================================================== RCS file: /cvsroot/igarden/Garden/source/LayoutDB/Layout.h,v retrieving revision 1.18.2.2 retrieving revision 1.18.2.3 diff -C2 -d -r1.18.2.2 -r1.18.2.3 *** Layout.h 26 Nov 2006 01:22:52 -0000 1.18.2.2 --- Layout.h 7 Dec 2006 01:23:03 -0000 1.18.2.3 *************** *** 43,46 **** --- 43,47 ---- class PathElement; class RGXMLWriter; + class RGZipFile; using yaaf::XGSend; *************** *** 66,69 **** --- 67,71 ---- typedef XGSDynArray<PathElement*> pathELementArray_t; typedef void (*elementCB_t)(Element *element, void *ref); + typedef XGDynArray<String> stringSet_t; class PaletteGroup *************** *** 144,147 **** --- 146,150 ---- void ExtractMaterialReferences(ClientDocument *doc); bool PlotNameFromID(XGUUID &uid, String &name); + void UniqueAerialPictures(stringSet_t &strings); protected: Index: Layout.cpp =================================================================== RCS file: /cvsroot/igarden/Garden/source/LayoutDB/Layout.cpp,v retrieving revision 1.27.2.4 retrieving revision 1.27.2.5 diff -C2 -d -r1.27.2.4 -r1.27.2.5 *** Layout.cpp 5 Dec 2006 03:06:06 -0000 1.27.2.4 --- Layout.cpp 7 Dec 2006 01:23:03 -0000 1.27.2.5 *************** *** 1187,1189 **** --- 1187,1203 ---- } + void Layout::UniqueAerialPictures(stringSet_t &strings) + { + GardenPlot *alt; + long n, count; + + count = NumPlots(); + for(n = 0; n < count; n++) + { + alt = GetIndexedPlot(n); + alt->UniqueAerialPictures(strings); + } + } + + Index: GardenPlot.h =================================================================== RCS file: /cvsroot/igarden/Garden/source/LayoutDB/GardenPlot.h,v retrieving revision 1.19.2.1 retrieving revision 1.19.2.2 diff -C2 -d -r1.19.2.1 -r1.19.2.2 *** GardenPlot.h 1 Nov 2006 03:09:47 -0000 1.19.2.1 --- GardenPlot.h 7 Dec 2006 01:23:03 -0000 1.19.2.2 *************** *** 42,45 **** --- 42,46 ---- class RGXMLWriter; class MaterialRef; + class RGZipFile; using yaaf::XGSend; *************** *** 118,121 **** --- 119,123 ---- void SetAerialPictureFrom(GardenPlot *plot); void GetFileSpec(XGFileSpecifier &fileSpec); + void UniqueAerialPictures(stringSet_t &strings); void GetViewCropRect(Rect &cropRect); void SaveScale(planScale_t scale); Index: GardenPlot.cpp =================================================================== RCS file: /cvsroot/igarden/Garden/source/LayoutDB/GardenPlot.cpp,v retrieving revision 1.50.2.1 retrieving revision 1.50.2.2 diff -C2 -d -r1.50.2.1 -r1.50.2.2 *** GardenPlot.cpp 1 Nov 2006 03:09:47 -0000 1.50.2.1 --- GardenPlot.cpp 7 Dec 2006 01:23:03 -0000 1.50.2.2 *************** *** 51,54 **** --- 51,55 ---- #include "RGXMLUtils.h" #include "RGPatternCache.h" + #include "RGZipFile.h" const Int32 kFieldWriteLayer = 0; *************** *** 1240,1243 **** --- 1241,1271 ---- } + void GardenPlot::UniqueAerialPictures(stringSet_t &strings) + { + String subPath; + XGFile srcFile; + long i, count; + + if(_fileSpec.Exists() == XGFileSpecifier::kTypeFile) + { + char name[256], buf[4096]; + String str; + bool found = false; + + _fileSpec.GetName(name); + str.SetCString(name); + + count = strings.Length(); + for(i = 0; i < count; i++) + { + if(strings[i] == str) + found = true; + } + + if(!found) + strings.push_back(str); + } + } + void GardenPlot::GetViewCropRect(Rect &cropRect) { |