diff options
author | Clifford Wolf <clifford@clifford.at> | 2018-08-19 17:23:21 +0200 |
---|---|---|
committer | Clifford Wolf <clifford@clifford.at> | 2018-08-19 17:23:21 +0200 |
commit | e45769292a36791f0d8a0030f89d4c8c1f241f24 (patch) | |
tree | d8935a95749ee33b3066c9aef3dbe7fb7a73c08d | |
parent | 91c60ac66715de07c6980e753bbb906b0cf15a29 (diff) | |
download | nextpnr-e45769292a36791f0d8a0030f89d4c8c1f241f24.tar.gz nextpnr-e45769292a36791f0d8a0030f89d4c8c1f241f24.tar.bz2 nextpnr-e45769292a36791f0d8a0030f89d4c8c1f241f24.zip |
Fix iCE40 pip gfx for pips on the top edge of a switchbox
Signed-off-by: Clifford Wolf <clifford@clifford.at>
-rw-r--r-- | ice40/gfx.cc | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/ice40/gfx.cc b/ice40/gfx.cc index 02f2668b..54575060 100644 --- a/ice40/gfx.cc +++ b/ice40/gfx.cc @@ -920,22 +920,22 @@ void pipGfx(std::vector<GraphicElement> &g, int x, int y, float x1, float y1, fl el.style = style; if (fabsf(x1 - swx1) < 0.001 && fabsf(x2 - swx1) < 0.001) { - tx = x1 + 0.25 * fabsf(y1 - y2); + tx = swx1 + 0.25 * fabsf(y1 - y2); goto edge_pip; } if (fabsf(x1 - swx2) < 0.001 && fabsf(x2 - swx2) < 0.001) { - tx = x1 - 0.25 * fabsf(y1 - y2); + tx = swx2 - 0.25 * fabsf(y1 - y2); goto edge_pip; } if (fabsf(y1 - swy1) < 0.001 && fabsf(y2 - swy1) < 0.001) { - ty = y1 + 0.25 * fabsf(x1 - x2); + ty = swy1 + 0.25 * fabsf(x1 - x2); goto edge_pip; } - if (fabsf(y1 - swy1) < 0.001 && fabsf(y2 - swy1) < 0.001) { - ty = y1 + 0.25 * fabsf(x1 - x2); + if (fabsf(y1 - swy2) < 0.001 && fabsf(y2 - swy2) < 0.001) { + ty = swy2 - 0.25 * fabsf(x1 - x2); goto edge_pip; } |