equal
deleted
inserted
replaced
180 // Create an .eps file showing the colors of a default Palette |
180 // Create an .eps file showing the colors of a default Palette |
181 ListDigraph h; |
181 ListDigraph h; |
182 ListDigraph::NodeMap<int> hcolors(h); |
182 ListDigraph::NodeMap<int> hcolors(h); |
183 ListDigraph::NodeMap<Point> hcoords(h); |
183 ListDigraph::NodeMap<Point> hcoords(h); |
184 |
184 |
185 int cols=int(sqrt(double(palette.size()))); |
185 int cols=int(std::sqrt(double(palette.size()))); |
186 for(int i=0;i<int(paletteW.size());i++) { |
186 for(int i=0;i<int(paletteW.size());i++) { |
187 Node n=h.addNode(); |
187 Node n=h.addNode(); |
188 hcoords[n]=Point(1+i%cols,1+i/cols); |
188 hcoords[n]=Point(1+i%cols,1+i/cols); |
189 hcolors[n]=i; |
189 hcolors[n]=i; |
190 } |
190 } |