# Placing tikz objects after a nonlinear transformation

I'm trying to place certain objects on my page. Normally you can use the shift argument to place the object at a set of coordinates, or even current page. None of that seems functional with the following piece of code:

\documentclass{article}
\usepackage[a4paper]{geometry}
\usepackage[usenames,dvipsnames]{color}
\usepackage{tikz}
\usepgfmodule{nonlineartransformations}
\pagenumbering{gobble}

\definecolor{lightblue}{RGB}{51,127,230}
\definecolor{olive2}{RGB}{64,196,0}
\definecolor{dorange}{RGB}{255,140,0}

\tikzset{
arrownode/.style={
transform shape nonlinear=true,
shape=double arrow,
line width=10mm,
shape border rotate=180,
upper left=cyan!25,
lower left=dorange!5,
upper right=olive!35,
lower right=dorange!20,
}
}
\makeatletter
\def\polartransformation{% I'll probably need another transformation? I can't find anything in the PGF manual on using a third variable
\pgfmathsincos@{\pgf@x}
\pgf@x=\pgfmathresultx\pgf@y%
\pgf@y=\pgfmathresulty\pgf@y%
}
\makeatother

\begin{document}
\centering
\begin{tikzpicture}
\begin{scope}[remember picture,overlay]% I want to use shift={<argument>} here in CARTESIAN COORDINATES.
\pgftransformnonlinear{\polartransformation}
%%%%%%%%%%%%%% Draw the node
\node[arrownode,shading angle=0] (a) at (1.5*pi,-5) {\phantom{\hspace{2cm}Gleidende schaal\hspace{4cm}}};
\end{scope}
\end{tikzpicture}
\end{document}


How do I get this thing to go to for instance (-5,-5)?

-
Add shift={(5,-5)} to the scope options. – percusse Apr 13 '14 at 17:05
That's another interesting problem! It looks that you need inverse transformation function. Ah, maybe not... – Malipivo Apr 13 '14 at 17:05
I most certainly tried to add shift to the scope options. This shape is rock solid rooted in place. – 1010011010 Apr 13 '14 at 17:13
because there is nothing else in the picture so even if you move it tikz will truncate it. Add a node somewhere else and you'll see. – percusse Apr 13 '14 at 22:02
I've tried placing the object in my actual picture. The fact even aligning with the node current page.south yields no results should be sufficient to exclude that simple solution. EDIT: I'll post some screenshots for clarification. i.imgur.com/46fltCM.png?1 EDIT2: I noticed that it may not be completely clear. I can use any node within this project and it will always lock in place at cartesian coordinates (0,0). – 1010011010 Apr 13 '14 at 22:30

I REVISED my solution to use the approach of What are the ways to position things absolutely on the page? to place an object by specifying the absolute paper coordinates. I placed the object as a "watermark", but it is not clear to me if that is or is not what you want, or whether it could be adapted to your needs.

\documentclass{article}
\usepackage[a4paper]{geometry}
\usepackage[usenames,dvipsnames]{color}
\usepackage{tikz}
\usepgfmodule{nonlineartransformations}
\pagenumbering{gobble}

\definecolor{lightblue}{RGB}{51,127,230}
\definecolor{olive2}{RGB}{64,196,0}
\definecolor{dorange}{RGB}{255,140,0}

\tikzset{
arrownode/.style={
transform shape nonlinear=true,
shape=double arrow,
line width=10mm,
shape border rotate=180,
upper left=cyan!25,
lower left=dorange!5,
upper right=olive!35,
lower right=dorange!20,
}
}
\makeatletter
\def\polartransformation{% I'll probably need another transformation? I can't find anything in the PGF manual on using a third variable
\pgfmathsincos@{\pgf@x}
\pgf@x=\pgfmathresultx\pgf@y%
\pgf@y=\pgfmathresulty\pgf@y%
}
\makeatother
\usepackage{lipsum}
\usepackage{everypage}
\def\PageTopMargin{1in}
\def\PageLeftMargin{1in}
\newcommand\atxy[3]{%
\raisebox{\dimexpr\PageTopMargin+\voffset-#2\relax}{\textcolor{red}{#3}}}}}
\begin{document}
\lipsum[1]
\atxy{4.25in}{5.5in}{%SHIFT IS ACCOMPLISHED HERE IN CARTESIAN (PAPER COORDINATES)
\begin{tikzpicture}
\begin{scope}[remember picture,overlay]% I want to use shift={<argument>} here in CARTESIAN COORDINATES.
\pgftransformnonlinear{\polartransformation}
%%%%%%%%%%%%%% Draw the node
\node[arrownode,shading angle=0] (a) at (1.5*pi,-5) {\phantom{\hspace{2cm}Gleidende schaal\hspace{4cm}}};
\end{scope}
\end{tikzpicture}%
}
\lipsum[2]
\end{document}


If one does not want it as a watermark effect, then a proper use of \vspace or some other space skipping mechanism (e.g., immediately before \lipsum[2]) would allow the figure to be isolated:

-
ah ok now I see it. Yes it is the way to go. I was thinking of placing inside the tikzpicture but this is placing THE tikz picture. – percusse Apr 14 '14 at 11:33
@percusse Issuing a \vspace{5in} prior to \lipsum[2] will place the text around the figure, rather than overlay it. It will require some extra calculation on one's part if one does not want overlays, but it would give one the necessary control. – Steven B. Segletes Apr 14 '14 at 11:35
Yeah, this is pretty much what I wanted. I think referring to this node from another tikzpicture can still be done using macros (?). Regardless, this is pretty much as robust as I would need my solution. Thank you. – 1010011010 Apr 14 '14 at 11:57

After fiddling around a little and asking around as well, I've come to the following answer: in tikz-pgf it is possible to embed nodes into another node:

\draw (0,0) node {\begin{tikzpicture}

\begin{scope}[remember picture,overlay] \pgftransformnonlinear{\polartransformation}

\node[arrownode,shading angle=0] (a) at (1.5*pi,-5) {\phantom{\hspace{2cm}Gleidende schaal\hspace{4cm}}};

\path[decorate,decoration={text along path,text format delimiters={[}{]},

text={[\Huge]GLEIDENDE SCHAAL},

text align={fit to path},

raise=-2ex,

}](a.west) -- (a.east);

\end{scope}

\end{tikzpicture}};


This also allows you to refer to this node within the same picture.

-