From c33f57f9df8392a05bc291308ed39eba68f79e9a Mon Sep 17 00:00:00 2001 From: Lukas Liebel Date: Thu, 28 Feb 2019 13:24:52 +0100 Subject: [PATCH] Added option to name input image node Adding a `name` parameter to `to_input` allows referencing the input image, e.g., for drawing connectors or relative positioning. I dislike `temp` as the default name but didn't change it in order to preserve backward compatibility. --- pycore/tikzeng.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pycore/tikzeng.py b/pycore/tikzeng.py index 17df4df..714ca90 100644 --- a/pycore/tikzeng.py +++ b/pycore/tikzeng.py @@ -34,9 +34,9 @@ def to_begin(): # layers definition -def to_input( pathfile, to='(-3,0,0)', width=8, height=8 ): +def to_input( pathfile, to='(-3,0,0)', width=8, height=8, name="temp" ): return r""" -\node[canvas is zy plane at x=0] (temp) at """+ to +""" {\includegraphics[width="""+ str(width)+"cm"+""",height="""+ str(height)+"cm"+"""]{"""+ pathfile +"""}}; +\node[canvas is zy plane at x=0] (""" + name + """) at """+ to +""" {\includegraphics[width="""+ str(width)+"cm"+""",height="""+ str(height)+"cm"+"""]{"""+ pathfile +"""}}; """ # Conv