From a1cd9fcf73685a5b0c4e721d405550096d85d566 Mon Sep 17 00:00:00 2001 From: David Shah Date: Mon, 9 Jul 2018 14:53:20 +0200 Subject: Reduce line width, adding some switchboxes Signed-off-by: David Shah --- gui/fpgaviewwidget.cc | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'gui') diff --git a/gui/fpgaviewwidget.cc b/gui/fpgaviewwidget.cc index 0c6b1a98..831f80d4 100644 --- a/gui/fpgaviewwidget.cc +++ b/gui/fpgaviewwidget.cc @@ -346,7 +346,7 @@ void FPGAViewWidget::paintGL() matrix.scale(zoom_ * 0.01f, zoom_ * 0.01f, 0); // Draw grid. - auto grid = LineShaderData(0.01f, QColor("#DDD")); + auto grid = LineShaderData(0.001f, QColor("#DDD")); for (float i = -100.0f; i < 100.0f; i += 1.0f) { PolyLine(-100.0f, i, 100.0f, i).build(grid); PolyLine(i, -100.0f, i, 100.0f).build(grid); @@ -354,7 +354,7 @@ void FPGAViewWidget::paintGL() lineShader_.draw(grid, matrix); // Draw Bels. - auto bels = LineShaderData(0.02f, QColor("#b000ba")); + auto bels = LineShaderData(0.002f, QColor("#b000ba")); if (ctx_) { for (auto bel : ctx_->getBels()) { for (auto &el : ctx_->getBelGraphics(bel)) @@ -364,7 +364,7 @@ void FPGAViewWidget::paintGL() } // Draw Frame Graphics. - auto frames = LineShaderData(0.02f, QColor("#0066ba")); + auto frames = LineShaderData(0.002f, QColor("#0066ba")); if (ctx_) { for (auto &el : ctx_->getFrameGraphics()) { drawElement(frames, el); -- cgit v1.2.3 From a4129036518678ee35d5d8adde3dfe0b699491ea Mon Sep 17 00:00:00 2001 From: David Shah Date: Mon, 9 Jul 2018 15:33:09 +0200 Subject: Increase max zoom, decrease line width Signed-off-by: David Shah --- gui/fpgaviewwidget.cc | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'gui') diff --git a/gui/fpgaviewwidget.cc b/gui/fpgaviewwidget.cc index 831f80d4..ae0b9240 100644 --- a/gui/fpgaviewwidget.cc +++ b/gui/fpgaviewwidget.cc @@ -297,8 +297,8 @@ void FPGAViewWidget::setZoom(float t_z) if (zoom_ < 1.0f) zoom_ = 1.0f; - if (zoom_ > 100.f) - zoom_ = 100.0f; + if (zoom_ > 500.f) + zoom_ = 500.0f; update(); } @@ -354,7 +354,7 @@ void FPGAViewWidget::paintGL() lineShader_.draw(grid, matrix); // Draw Bels. - auto bels = LineShaderData(0.002f, QColor("#b000ba")); + auto bels = LineShaderData(0.0005f, QColor("#b000ba")); if (ctx_) { for (auto bel : ctx_->getBels()) { for (auto &el : ctx_->getBelGraphics(bel)) -- cgit v1.2.3 From 7081cca01654030f9a3b731cebf36e68590e3ed1 Mon Sep 17 00:00:00 2001 From: Clifford Wolf Date: Wed, 11 Jul 2018 14:03:23 +0200 Subject: Add GUI Decals API Signed-off-by: Clifford Wolf --- gui/fpgaviewwidget.cc | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) (limited to 'gui') 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_) { -- cgit v1.2.3