| 317 | } |
| 318 | |
| 319 | void FillTool::drawObjectIDs(Map* map, QPainter* painter, const RenderConfig &config) |
| 320 | { |
| 321 | Q_STATIC_ASSERT(MapColor::Reserved == -1); |
| 322 | Q_ASSERT(!map->isAreaHatchingEnabled()); |
| 323 | |
| 324 | auto part = map->getCurrentPart(); |
| 325 | auto num_objects = qMin(part->getNumObjects(), int(RGB_MASK)); |
| 326 | auto num_colors = map->getNumColors(); |
| 327 | for (auto c = num_colors-1; c >= MapColor::Reserved; --c) |
| 328 | { |
| 329 | auto map_color = map->getColor(c); |
| 330 | for (int o = 0; o < num_objects; ++o) |
| 331 | { |
| 332 | auto object = part->getObject(o); |
| 333 | if (object->getType() != Object::Path) |
| 334 | continue; |
| 335 | if (auto symbol = object->getSymbol()) |
| 336 | { |
| 337 | if (symbol->isHidden()) |
| 338 | continue; |
| 339 | if (symbol->getType() == Symbol::Area |
| 340 | && static_cast<const AreaSymbol*>(symbol)->getColor() != map_color) |
| 341 | continue; |
| 342 | } |
| 343 | |
| 344 | object->update(); |
| 345 | object->renderables().draw(c, QRgb(o) | ~RGB_MASK, painter, config); |
| 346 | } |
| 347 | } |
| 348 | } |
| 349 | |
| 350 | int FillTool::traceBoundary(const QImage& image, const QPoint& free_pixel, const QPoint& boundary_pixel, std::vector<QPoint>& out_boundary) |
| 351 | { |
nothing calls this directly
no test coverage detected