From eb3c89bee97f76d12d68aaf3f150259277b615b8 Mon Sep 17 00:00:00 2001 From: Clifford Wolf Date: Mon, 4 Jun 2018 12:02:58 +0200 Subject: [PATCH] Replace GuiLine with GraphicElement Signed-off-by: Clifford Wolf --- common/design.h | 13 +++++++++++++ dummy/chip.h | 13 ++++--------- ice40/chip.h | 11 ++++------- 3 files changed, 21 insertions(+), 16 deletions(-) diff --git a/common/design.h b/common/design.h index edf7dba1..e87304bf 100644 --- a/common/design.h +++ b/common/design.h @@ -34,6 +34,19 @@ template using pool = std::unordered_set; template using dict = std::unordered_map; using std::vector; +struct GraphicElement +{ + enum { + G_LINE, + G_BOX, + G_CIRCLE, + G_LABEL + } type; + + float x1, y1, x2, y2, z; + std::string text; +}; + #include "chip.h" struct CellInfo; diff --git a/dummy/chip.h b/dummy/chip.h index cc5013df..f403552f 100644 --- a/dummy/chip.h +++ b/dummy/chip.h @@ -160,11 +160,6 @@ struct BelPinRange BelPinIterator end() const { return e; } }; -struct GuiLine -{ - float x1, y1, x2, y2; -}; - struct ChipArgs { // ... @@ -188,10 +183,10 @@ struct Chip BelRange getBelsByType(BelType type) const; BelType getBelType(BelId bel) const; - void getBelPosition(BelId bel, float &x, float &y) const; - void getWirePosition(WireId wire, float &x, float &y) const; - vector getBelGuiLines(BelId bel) const; - vector getWireGuiLines(WireId wire) const; + // void getBelPosition(BelId bel, float &x, float &y) const; + // void getWirePosition(WireId wire, float &x, float &y) const; + // vector getBelGuiLines(BelId bel) const; + // vector getWireGuiLines(WireId wire) const; WireRange getWires() const; WireDelayRange getWiresUphill(WireId wire) const; diff --git a/ice40/chip.h b/ice40/chip.h index 7ce1a406..57f0fa99 100644 --- a/ice40/chip.h +++ b/ice40/chip.h @@ -272,11 +272,6 @@ struct BelPinRange // ----------------------------------------------------------------------- -struct GuiLine -{ - float x1, y1, x2, y2; -}; - struct ChipArgs { enum { @@ -346,8 +341,10 @@ struct Chip // FIXME: void getBelPosition(BelId bel, float &x, float &y) const; // FIXME: void getWirePosition(WireId wire, float &x, float &y) const; - // FIXME: vector getBelGuiLines(BelId bel) const; - // FIXME: vector getWireGuiLines(WireId wire) const; + // FIXME: vector getBelGraphics(BelId bel) const; + // FIXME: vector getWireGraphics(WireId wire) const; + // FIXME: vector getPipGraphics(WireId src, WireId dst) const; + // FIXME: vector getFrameGraphics() const; AllWireRange getWires() const {