diff options
author | Koen van der Heijden <koen.vd.heijden1@gmail.com> | 2016-12-12 01:10:09 +0100 |
---|---|---|
committer | Koen van der Heijden <koen.vd.heijden1@gmail.com> | 2016-12-12 01:10:09 +0100 |
commit | d4c22dc2a0dda1f4f210cee038585c62e56e991c (patch) | |
tree | ef0ff9844f345782e42465114f4f1f350eb9b2a8 /chip_design | |
parent | 9b7c783f1fd590f4e2f2209a4871cee84ee569ec (diff) | |
parent | 43205ebac5e3c0282de4ecd272c677d34a5baefc (diff) | |
download | 2IMF25-AR-d4c22dc2a0dda1f4f210cee038585c62e56e991c.tar.gz |
Merge branch 'master' of Lekensteyn:true/2IMF25-AR
Diffstat (limited to 'chip_design')
-rwxr-xr-x | chip_design/solution-to-latex.py | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/chip_design/solution-to-latex.py b/chip_design/solution-to-latex.py index 2028b1b..798267a 100755 --- a/chip_design/solution-to-latex.py +++ b/chip_design/solution-to-latex.py @@ -80,6 +80,12 @@ def print_boxes(): tpl = r"\draw[{attrs}] ({x}, {y}) rectangle ({x2}, {y2});" print(tpl.strip().format(**vars())) + # Draw number for debugging + tx = x + w/2 + ty = y + h/2 + text = r"%s\\(%s x %s)" % (i, w, h) + print(r'\node[align=center] at (%f,%f) {%s};' % (tx, ty, text)) + def print_grid(): # XXX currently hard-coding grid size print(r'\draw[step=1,gray,very thin] (0, 0) grid (30, 30);') |