Changeset 1007
- Timestamp:
- Jan 3, 2010, 7:09:43 PM (13 years ago)
- Location:
- trunk/lib
- Files:
-
- 7 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/lib/Directory.cc
r1005 r1007 24 24 25 25 #include "Alias.h" 26 #include "Configuration.h" 26 27 #include "File.h" 27 28 #include "html_utility.h" … … 187 188 ss << "../../../"; 188 189 if (user=="all") 189 ss << stats.plot(imagedir+"/index .svg", line_type);190 ss << stats.plot(imagedir+"/index", line_type); 190 191 else 191 ss << imagedir << "/index .svg";192 ss << imagedir << "/index"; 192 193 os << "<p class=\"plot\">\n"; 193 os << image( "svg", ss.str());194 os << image(Configuration::instance().image_format(), ss.str()); 194 195 os << "</p>\n"; 195 196 -
trunk/lib/File.cc
r1005 r1007 368 368 lpath = "index"; 369 369 std::string outpath = stats_type+"/"+user+"/"+line_type+"/"+lpath; 370 std::string imagefile = stats_type+"/"+"images/"+line_type+"/"+ 371 lpath+".svg"; 370 std::string imagefile = stats_type+"/"+"images/"+line_type+"/"+lpath; 372 371 std::string html_name(outpath + ".html"); 373 372 std::ofstream os(html_name.c_str()); … … 385 384 ss << imagefile; 386 385 os << "<p class=\"plot\">\n"; 387 os << image( "svg", ss.str());386 os << image(Configuration::instance().image_format(), ss.str()); 388 387 os << "</p>\n"; 389 388 -
trunk/lib/Graph.cc
r951 r1007 33 33 std::vector<std::string> Graph::xticks_; 34 34 35 Graph::Graph(const std::string& filename )35 Graph::Graph(const std::string& filename, const std::string& format) 36 36 #ifdef HAVE_PLPLOT 37 : plots_(0), pls_(1,1, "svg",filename.c_str()), timeformat_("%y-%b"),37 : plots_(0), pls_(1,1,format.c_str(),filename.c_str()), timeformat_("%y-%b"), 38 38 title_(filename), xmin_(0.0), xmax_(0.0), ymin_(0.0), ymax_(0.0) 39 39 { … … 42 42 legend_.reserve(10); 43 43 // we use color map 0 position 0 for background color 44 pls_.scolbga(255,255,255,0); 44 if (format=="png") 45 pls_.scolbg(255,255,255); 46 else 47 pls_.scolbga(255,255,255,0); 45 48 pls_.init(); 46 49 pls_.adv(0); -
trunk/lib/Graph.h
r946 r1007 64 64 the graph object is destroyed. 65 65 */ 66 explicit Graph(const std::string& filename);66 Graph(const std::string& filename, const std::string& format); 67 67 68 68 /** -
trunk/lib/Stats.cc
r1004 r1007 25 25 26 26 #include "Colors.h" 27 #include "Configuration.h" 27 28 #include "Functor.h" 28 29 #include "Graph.h" … … 364 365 { 365 366 assert(total_stats().size()); 366 Graph gp(filename); 367 Graph gp(filename+"."+Configuration::instance().image_format(), 368 Configuration::instance().image_format()); 367 369 const Author2Vector* stat=NULL; 368 370 if (linetype=="total") … … 431 433 void Stats::plot_summary(const std::string& filename) const 432 434 { 433 Graph gp(filename); 435 Graph gp(filename+"."+Configuration::instance().image_format(), 436 Configuration::instance().image_format()); 434 437 std::vector<unsigned int> total = get_vector(total_stats(), "all"); 435 438 double yrange_max=1.03*total.back()+1; -
trunk/lib/first_page.cc
r1005 r1007 230 230 void print_summary_plot(std::ostream& os, const Stats& stats) 231 231 { 232 std::string name("summary_plot .svg");232 std::string name("summary_plot"); 233 233 stats.plot_summary(name); 234 234 os << "<div class=\"main\">\n"; 235 os << image( "svg", name);235 os << image(Configuration::instance().image_format(), name); 236 236 os << "</div>"; 237 237 -
trunk/lib/html_utility.cc
r1006 r1007 66 66 std::ostringstream os; 67 67 if (format=="svg") 68 os << "<object data='" << name << "' type='image/svg+xml' width='600'>\n" 69 << "<embed src='" << name << "' type='image/svg+xml' width='600' />\n" 68 os << "<object data='" << name << ".svg' type='image/svg+xml'" 69 << " width='600'>\n" 70 << "<embed src='" << name << ".svg' type='image/svg+xml'" 71 << " width='600' />\n" 70 72 << "</object>\n"; 73 else if (format=="png") 74 os << "<img src='" << name << ".png' alt='[plot]'/>"; 71 75 else { 72 76 assert(false);
Note: See TracChangeset
for help on using the changeset viewer.