Changeset 864 for trunk/lib/Directory.cc


Ignore:
Timestamp:
Nov 20, 2009, 9:12:30 PM (12 years ago)
Author:
Jari Häkkinen
Message:

Addresses #97. All plots generated. Now its time to go for publication quality plots.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/lib/Directory.cc

    r847 r864  
    22
    33/*
    4   Copyright (C) 2005, 2006, 2007, 2008 Jari Häkkinen, Peter Johansson
    5   Copyright (C) 2009 Peter Johansson
     4  Copyright (C) 2005, 2006, 2007, 2008, 2009 Jari Häkkinen, Peter Johansson
    65
    76  This file is part of svndigest, http://dev.thep.lu.se/svndigest
     
    3938#include <list>
    4039#include <map>
     40#include <sstream>
    4141
    4242#include <cerrno> // Needed to check error state below.
     
    180180                   local_path()+"/index.html", stats_type);
    181181    path_anchor(os);
    182     os << "<p class=\"plot\">\n<img src='";
     182
     183    std::stringstream ss;
    183184    for (size_t i=0; i<level_; ++i)
    184       os << "../";
    185     os << "../../../";
     185      ss << "../";
     186    ss << "../../../";
    186187    if (user=="all")
    187       os << stats.plot(imagedir+"/index.png", line_type);
     188      ss << stats.plot(imagedir+"/index.svg", line_type);
    188189    else
    189       os << imagedir << "/index.png";
    190     os << "' alt='[plot]' /></p>\n";
     190      os << imagedir << "/index.svg";
     191    os << "<p class=\"plot\">\n";
     192    os << "<object data='" << ss.str() << "' type='image/svg+xml' width='600'\n"
     193       << "<embed src='" << ss.str() << "' type='image/svg+xml' width='600' />\n"
     194       << "</object>\n";
     195    os << "</p>\n";
     196
    191197    os << "<h3>File Summary";
    192198    if (user!="all")
Note: See TracChangeset for help on using the changeset viewer.