| 341 | } |
| 342 | |
| 343 | std::string LabelColorSwatch(const Label& l) |
| 344 | { |
| 345 | const auto& c = l.GetColor(); |
| 346 | std::ostringstream os; |
| 347 | os << "<span style=\"display:inline-block;width:12px;height:12px;background:rgb(" |
| 348 | << static_cast<int>(c.GetRed() * 255) << ',' |
| 349 | << static_cast<int>(c.GetGreen() * 255) << ',' |
| 350 | << static_cast<int>(c.GetBlue() * 255) << ")\"></span>"; |
| 351 | return os.str(); |
| 352 | } |
| 353 | |
| 354 | // Renders one label as a table row. Rows nested under a group header are |
| 355 | // indented; a standalone Label table renders flush. |
no test coverage detected