Am using Tikz, and have a slightly complicated drawing. Now I want to replace a rectangle in a certain place with a more sophisticated shape. This shape I have in SVG format, and I want to replace the dozen or so SVG path instructions with Tikz commands, ie remove the SVG entirely.
So, I have a rectangle with position x,y and size wd,ht in the original Tikz picture, where I want to put a bunch of line and curve commands which use a different coordinate system.
Edit: I want to (for example) replace
\draw (x1,y1) rectangle (x2,y2);
with
\draw (x1,y1) mypic (x2,y2);
where mypic is defined in terms of a different coordinate system, and has some given size in that coordinate system, and can be assumed to have the appropriate relationship between the axes, ie I am not interested in different "scaling" for x and y.
Is there a way to accomplish this without recalculating anything, or explicitly "scaling" or anything like that?
I want to just define my new shape in a macro or something and then use it, and everything is automatic.
What is the simplest solution?
(This question is similar but not identical.)
pics for that. Are you familiar withpics? See e.g. this answer for a use case. You can makepics depend on parameters. – Mar 18 '19 at 01:14pic, I still need to define the coordinate transformation, apparently. – Tomas By Mar 18 '19 at 10:54