@@ -820,7 +820,8 @@ bool RenderThread::drawTextInBBox(const QColor& text_color,
820820
821821void RenderThread::drawBlockages (QPainter* painter,
822822 odb::dbBlock* block,
823- const Rect& bounds)
823+ const Rect& bounds,
824+ const std::vector<odb::dbInst*>& insts)
824825{
825826 if (!viewer_->options_ ->areBlockagesVisible ()) {
826827 return ;
@@ -844,6 +845,23 @@ void RenderThread::drawBlockages(QPainter* painter,
844845 Rect bbox = blockage->getBBox ()->getBox ();
845846 painter->drawRect (bbox.xMin (), bbox.yMin (), bbox.dx (), bbox.dy ());
846847 }
848+
849+ for (odb::dbInst* inst : insts) {
850+ if (restart_) {
851+ break ;
852+ }
853+ odb::dbBox* halo = inst->getHalo ();
854+ if (halo != nullptr ) {
855+ Rect instbox = inst->getBBox ()->getBox ();
856+ Rect halobox = halo->getBox ();
857+ instbox.set_xlo (instbox.xMin () - halobox.xMin ());
858+ instbox.set_ylo (instbox.yMin () - halobox.yMin ());
859+ instbox.set_xhi (instbox.xMax () + halobox.xMax ());
860+ instbox.set_yhi (instbox.yMax () + halobox.yMax ());
861+ painter->drawRect (
862+ instbox.xMin (), instbox.yMin (), instbox.dx (), instbox.dy ());
863+ }
864+ }
847865}
848866
849867void RenderThread::drawObstructions (odb::dbBlock* block,
@@ -1198,7 +1216,7 @@ void RenderThread::drawChip(QPainter* painter,
11981216
11991217 // draw blockages
12001218 utl::Timer inst_blockages;
1201- drawBlockages (painter, block, bounds);
1219+ drawBlockages (painter, block, bounds, insts );
12021220 debugPrint (logger_, GUI, " draw" , 1 , " blockages {}" , inst_blockages);
12031221
12041222 dbTech* tech = block->getTech ();
0 commit comments