Changeset 8747
- Timestamp:
- 06/28/11 15:11:08 (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
issm/trunk/src/c/modules/Exp2Kmlx/Exp2Kmlx.cpp
r8741 r8747 28 28 29 29 int i,j,iret=0; 30 int lwidth=1; 31 double popac=0.50; 30 32 int nprof; 31 33 int *pnvert=NULL; … … 37 39 KML_File* kfile =NULL; 38 40 KML_Document* kdoc =NULL; 41 KML_Style* kstyle=NULL; 42 KML_LineStyle* klsty =NULL; 43 KML_PolyStyle* kpsty =NULL; 39 44 KML_Folder* kfold =NULL; 40 45 KML_Placemark* kplace=NULL; … … 68 73 kdoc->open =1; 69 74 75 /* construct style templates for defaults */ 76 77 klsty =new KML_LineStyle(); 78 sprintf(klsty->color ,"ff000000"); 79 sprintf(klsty->colormode ,"normal"); 80 klsty->width =lwidth; 81 kpsty =new KML_PolyStyle(); 82 sprintf(kpsty->color ,"%02xffffff",(int)floor(popac*255+0.5)); 83 sprintf(kpsty->colormode ,"random"); 84 kstyle=new KML_Style(); 85 kstyle->AddAttrib("id","BlackLineRandomPoly"); 86 kstyle->line =klsty; 87 kstyle->poly =kpsty; 88 (kdoc->style )->AddObject((Object*)kstyle); 89 90 klsty =new KML_LineStyle(); 91 sprintf(klsty->color ,"ff000000"); 92 sprintf(klsty->colormode ,"normal"); 93 klsty->width ,lwidth; 94 kpsty =new KML_PolyStyle(); 95 sprintf(kpsty->color ,"00ffffff"); 96 sprintf(kpsty->colormode ,"random"); 97 kstyle=new KML_Style(); 98 kstyle->AddAttrib("id","BlackLineEmptyPoly"); 99 kstyle->line =klsty; 100 kstyle->poly =kpsty; 101 (kdoc->style )->AddObject((Object*)kstyle); 102 103 klsty =new KML_LineStyle(); 104 sprintf(klsty->color ,"%02xffffff",(int)floor(popac*255+0.5)); 105 sprintf(klsty->colormode ,"random"); 106 klsty->width =lwidth*2; 107 kpsty =new KML_PolyStyle(); 108 sprintf(kpsty->color ,"00ffffff"); 109 sprintf(kpsty->colormode ,"random"); 110 kstyle=new KML_Style(); 111 kstyle->AddAttrib("id","RandomLineEmptyPoly"); 112 kstyle->line =klsty; 113 kstyle->poly =kpsty; 114 (kdoc->style )->AddObject((Object*)kstyle); 115 70 116 /* construct kml folder for polygons */ 71 117 … … 86 132 sprintf(kplace->name ,"Polygon with Holes"); 87 133 kplace->visibility=true; 134 sprintf(kplace->styleurl ,"#BlackLineRandomPoly"); 88 135 89 136 kpoly =new KML_Polygon(); … … 147 194 sprintf(kplace->name ,"Polygon %d",i+1); 148 195 kplace->visibility=true; 196 sprintf(kplace->styleurl ,"#BlackLineRandomPoly"); 149 197 150 198 kpoly =new KML_Polygon(); … … 175 223 sprintf(kplace->name ,"LineString %d",i+1); 176 224 kplace->visibility=true; 225 sprintf(kplace->styleurl ,"#RandomLineEmptyPoly"); 177 226 178 227 kline =new KML_LineString();
Note:
See TracChangeset
for help on using the changeset viewer.