Changeset 1025


Ignore:
Timestamp:
Jan 11, 2010, 2:19:54 AM (11 years ago)
Author:
Peter Johansson
Message:

support for png/png case, refs #279

Location:
trunk/lib
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/lib/css.cc

    r984 r1025  
    146146    s << " padding: 0 1em .1em 0;\n";
    147147    s << "}\n\n";
    148 
     148    s << "div.main img { border: 0; }\n";
    149149
    150150    s << "p.plot { text-align: center; }\n";
  • trunk/lib/html_utility.cc

    r1024 r1025  
    6666    std::ostringstream os;
    6767    const std::string& format = Configuration::instance().image_format();
     68    const std::string& anchor_format =
     69      Configuration::instance().image_anchor_format();
    6870    if (format=="svg")
    6971      os << "<object data='" << name << ".svg' type='image/svg+xml'"
     
    7274         << " width='600' />\n"
    7375         << "</object>\n";
    74     else if (format=="png")
    75       os << "<img src='" << name << ".png' alt='[plot]'/>";
     76    else if (format=="png") {
     77      if (anchor_format=="none")
     78        os << "<img src='" << name << ".png' alt='[plot]'/>";
     79      else
     80        os << "<a href=\"" << name << "." << anchor_format << "\">"
     81           << "<img src='" << name << ".png' alt='[plot]'/>"
     82           << "</a>";
     83    }
    7684    else if (format=="none")
    7785      os << "<!-- no images -->";
Note: See TracChangeset for help on using the changeset viewer.