Remove getFrameDecal() API

Signed-off-by: Clifford Wolf <clifford@clifford.at>
This commit is contained in:
Clifford Wolf 2018-08-01 11:19:43 +02:00
parent faf309c1fe
commit 29dd98420b
9 changed files with 1 additions and 34 deletions

View File

@ -436,10 +436,6 @@ std::vector<GraphicElement> Arch::getDecalGraphics(DecalId decal) const
{ {
std::vector<GraphicElement> ret; std::vector<GraphicElement> ret;
if (decal.type == DecalId::TYPE_FRAME) {
/* nothing */
}
if (decal.type == DecalId::TYPE_BEL) { if (decal.type == DecalId::TYPE_BEL) {
BelId bel; BelId bel;
bel.index = decal.z; bel.index = decal.z;
@ -473,14 +469,6 @@ std::vector<GraphicElement> Arch::getDecalGraphics(DecalId decal) const
return ret; return ret;
} }
DecalXY Arch::getFrameDecal() const
{
DecalXY decalxy;
decalxy.decal.type = DecalId::TYPE_FRAME;
decalxy.decal.active = true;
return decalxy;
}
DecalXY Arch::getBelDecal(BelId bel) const DecalXY Arch::getBelDecal(BelId bel) const
{ {
DecalXY decalxy; DecalXY decalxy;

View File

@ -793,7 +793,6 @@ struct Arch : BaseCtx
std::vector<GraphicElement> getDecalGraphics(DecalId decal) const; std::vector<GraphicElement> getDecalGraphics(DecalId decal) const;
DecalXY getFrameDecal() const;
DecalXY getBelDecal(BelId bel) const; DecalXY getBelDecal(BelId bel) const;
DecalXY getWireDecal(WireId wire) const; DecalXY getWireDecal(WireId wire) const;
DecalXY getPipDecal(PipId pip) const; DecalXY getPipDecal(PipId pip) const;

View File

@ -122,7 +122,7 @@ struct DecalId
{ {
enum enum
{ {
TYPE_FRAME, TYPE_NONE,
TYPE_BEL TYPE_BEL
} type; } type;
Location location; Location location;

View File

@ -426,8 +426,6 @@ bool Arch::route() { return router1(getCtx()); }
const std::vector<GraphicElement> &Arch::getDecalGraphics(DecalId decal) const { return decal_graphics.at(decal); } const std::vector<GraphicElement> &Arch::getDecalGraphics(DecalId decal) const { return decal_graphics.at(decal); }
DecalXY Arch::getFrameDecal() const { return frame_decalxy; }
DecalXY Arch::getBelDecal(BelId bel) const { return bels.at(bel).decalxy; } DecalXY Arch::getBelDecal(BelId bel) const { return bels.at(bel).decalxy; }
DecalXY Arch::getWireDecal(WireId wire) const { return wires.at(wire).decalxy; } DecalXY Arch::getWireDecal(WireId wire) const { return wires.at(wire).decalxy; }

View File

@ -89,7 +89,6 @@ struct Arch : BaseCtx
std::vector<std::vector<std::vector<BelId>>> bels_by_tile; std::vector<std::vector<std::vector<BelId>>> bels_by_tile;
std::unordered_map<DecalId, std::vector<GraphicElement>> decal_graphics; std::unordered_map<DecalId, std::vector<GraphicElement>> decal_graphics;
DecalXY frame_decalxy;
int gridDimX, gridDimY; int gridDimX, gridDimY;
std::vector<std::vector<int>> tileDimZ; std::vector<std::vector<int>> tileDimZ;
@ -206,7 +205,6 @@ struct Arch : BaseCtx
bool route(); bool route();
const std::vector<GraphicElement> &getDecalGraphics(DecalId decal) const; const std::vector<GraphicElement> &getDecalGraphics(DecalId decal) const;
DecalXY getFrameDecal() const;
DecalXY getBelDecal(BelId bel) const; DecalXY getBelDecal(BelId bel) const;
DecalXY getWireDecal(WireId wire) const; DecalXY getWireDecal(WireId wire) const;
DecalXY getPipDecal(PipId pip) const; DecalXY getPipDecal(PipId pip) const;

View File

@ -665,14 +665,6 @@ bool Arch::route() { return router1(getCtx()); }
// ----------------------------------------------------------------------- // -----------------------------------------------------------------------
DecalXY Arch::getFrameDecal() const
{
DecalXY decalxy;
decalxy.decal.type = DecalId::TYPE_FRAME;
decalxy.decal.active = true;
return decalxy;
}
DecalXY Arch::getBelDecal(BelId bel) const DecalXY Arch::getBelDecal(BelId bel) const
{ {
DecalXY decalxy; DecalXY decalxy;
@ -713,10 +705,6 @@ std::vector<GraphicElement> Arch::getDecalGraphics(DecalId decal) const
{ {
std::vector<GraphicElement> ret; std::vector<GraphicElement> ret;
if (decal.type == DecalId::TYPE_FRAME) {
/* nothing */
}
if (decal.type == DecalId::TYPE_GROUP) { if (decal.type == DecalId::TYPE_GROUP) {
int type = (decal.index >> 16) & 255; int type = (decal.index >> 16) & 255;
int x = (decal.index >> 8) & 255; int x = (decal.index >> 8) & 255;

View File

@ -714,7 +714,6 @@ struct Arch : BaseCtx
std::vector<GraphicElement> getDecalGraphics(DecalId decal) const; std::vector<GraphicElement> getDecalGraphics(DecalId decal) const;
DecalXY getFrameDecal() const;
DecalXY getBelDecal(BelId bel) const; DecalXY getBelDecal(BelId bel) const;
DecalXY getWireDecal(WireId wire) const; DecalXY getWireDecal(WireId wire) const;
DecalXY getPipDecal(PipId pip) const; DecalXY getPipDecal(PipId pip) const;

View File

@ -140,7 +140,6 @@ struct DecalId
enum : int8_t enum : int8_t
{ {
TYPE_NONE, TYPE_NONE,
TYPE_FRAME,
TYPE_BEL, TYPE_BEL,
TYPE_WIRE, TYPE_WIRE,
TYPE_PIP, TYPE_PIP,

View File

@ -317,8 +317,6 @@ int main(int argc, char *argv[])
std::cout << "<!-- " << ctx->getBelName(bel).str(ctx.get()) << " -->\n"; std::cout << "<!-- " << ctx->getBelName(bel).str(ctx.get()) << " -->\n";
svg_dump_decal(ctx.get(), ctx->getBelDecal(bel)); svg_dump_decal(ctx.get(), ctx->getBelDecal(bel));
} }
std::cout << "<!-- Frame -->\n";
svg_dump_decal(ctx.get(), ctx->getFrameDecal());
std::cout << "</svg>\n"; std::cout << "</svg>\n";
} }