diff options
author | Clifford Wolf <clifford@clifford.at> | 2018-07-11 14:03:23 +0200 |
---|---|---|
committer | Clifford Wolf <clifford@clifford.at> | 2018-07-11 14:03:23 +0200 |
commit | 7081cca01654030f9a3b731cebf36e68590e3ed1 (patch) | |
tree | 8e01a719c3622a94aa77419117d72338b2746a71 /gui | |
parent | 87d88048ac14de3fd70aca7e75f7b42ff424ece0 (diff) | |
download | nextpnr-7081cca01654030f9a3b731cebf36e68590e3ed1.tar.gz nextpnr-7081cca01654030f9a3b731cebf36e68590e3ed1.tar.bz2 nextpnr-7081cca01654030f9a3b731cebf36e68590e3ed1.zip |
Add GUI Decals API
Signed-off-by: Clifford Wolf <clifford@clifford.at>
Diffstat (limited to 'gui')
-rw-r--r-- | gui/fpgaviewwidget.cc | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/gui/fpgaviewwidget.cc b/gui/fpgaviewwidget.cc index ae0b9240..49ec4529 100644 --- a/gui/fpgaviewwidget.cc +++ b/gui/fpgaviewwidget.cc @@ -363,6 +363,26 @@ void FPGAViewWidget::paintGL() lineShader_.draw(bels, matrix); } + // Draw Wires. + auto wires = LineShaderData(0.0005f, QColor("#b000ba")); + if (ctx_) { + for (auto wire : ctx_->getWires()) { + for (auto &el : ctx_->getWireGraphics(wire)) + drawElement(wires, el); + } + lineShader_.draw(wires, matrix); + } + + // Draw Pips. + auto pips = LineShaderData(0.0005f, QColor("#b000ba")); + if (ctx_) { + for (auto wire : ctx_->getPips()) { + for (auto &el : ctx_->getPipGraphics(wire)) + drawElement(pips, el); + } + lineShader_.draw(pips, matrix); + } + // Draw Frame Graphics. auto frames = LineShaderData(0.002f, QColor("#0066ba")); if (ctx_) { |