Update drawGroup to propagate only GroupId

This commit is contained in:
Miodrag Milanovic 2024-12-04 09:08:11 +01:00
parent fb9ffd9498
commit 397406bd21
3 changed files with 4 additions and 3 deletions

View File

@ -525,7 +525,7 @@ std::vector<GraphicElement> Arch::getDecalGraphics(DecalId decal) const
GroupId group(decal.tile, decal.index);
Loc loc;
tile_xy(chip_info, decal.tile, loc.x, loc.y);
uarch->drawGroup(ret, getGroupType(group), loc);
uarch->drawGroup(ret, group, loc);
} else if (decal.type == DecalId::TYPE_BEL) {
BelId bel(decal.tile, decal.index);
GraphicElement::style_t style = decal.active ? GraphicElement::STYLE_ACTIVE : GraphicElement::STYLE_INACTIVE;

View File

@ -115,7 +115,7 @@ struct HimbaechelAPI
virtual void drawPip(std::vector<GraphicElement> &g, GraphicElement::style_t style, Loc loc, WireId src,
IdString src_type, int32_t src_id, WireId dst, IdString dst_type, int32_t dst_id) {};
virtual void drawGroup(std::vector<GraphicElement> &g, IdString group_type, Loc loc) {};
virtual void drawGroup(std::vector<GraphicElement> &g, GroupId group, Loc loc) {};
// Routing methods
virtual void expandBoundingBox(BoundingBox &bb) const;

View File

@ -139,8 +139,9 @@ struct ExampleImpl : HimbaechelAPI
return true;
}
void drawGroup(std::vector<GraphicElement> &g, IdString group_type, Loc loc) override
void drawGroup(std::vector<GraphicElement> &g, GroupId group, Loc loc) override
{
IdString group_type = ctx->getGroupType(group);
if (group_type == id_SWITCHBOX) {
GraphicElement el;
el.type = GraphicElement::TYPE_BOX;