Is there any way to find out what the current rotation angle is inside the definition of a TikZ pic? I need to define a pic with one component whose positioning is independent of the coordinate transformation of the pic. E.g.,
\tikzset{mypic/.pic = {
\draw[rotate=-\commandwhichfindsouttikzpicangle] (1,0)circle(0.1cm);
}
\pic[rotate=40] (p) at (1,0) {mypic};
should output a small circle at (2,0), and not ($(1,0)+(40:1)$).
Of course I'd also be happy with any other kind of code that defines a TikZ pic behaving like this. Maybe there's also a command to set back the rotation of the current coordinate transformation that would help?
pic
rotates everything in it. Maybe there's a better solution but for that we'd need to know what you're trying to do actually.