I try to make this shape but I have several problem.
First to place the logo inside the ellipse, I used
\pgftransformcm{1}{0}{0}{1}{\centerpoint}perhaps there is a better solution. I need to use\pgftransformcm{-1}{0}{0}{1}{\centerpoint}at the end because the text is inverted but with all the transformations I lost the baseline and the text is misplaced. This is the main questionI try to use
\inheritsavedanchorsbut without successTo get some good results, I think it's important to keep a ratio between height and width but how do this ?
Perhaps the calculations are bad but I prefer to understand how I need to do before remake all the calculations. It's possible to use the ratio height/width to get better results.
Here the long code, results are fine when I fixed the dimensions.

\documentclass{article}
\usepackage{tikz,fullpage}
\usetikzlibrary{shapes}
\begin{document}
\thispagestyle{empty}
\makeatletter
\newdimen\batmanx
\newdimen\batmany
\tikzset{ shape example/.style={
color=black!30,
draw,
fill=yellow!30,
line width=.5cm,
inner xsep=2.5cm,
inner ysep=0.5cm}
}
\pgfdeclareshape{batman}
{
\savedanchor\centerpoint{%
\pgf@x=.5\wd\pgfnodeparttextbox%
\pgf@y=.5\ht\pgfnodeparttextbox%
\advance\pgf@y by-.5\dp\pgfnodeparttextbox%
}
\savedanchor\radius{%
%
% Caculate ``height radius''
%
\pgf@y=.5\ht\pgfnodeparttextbox%
\advance\pgf@y by .5\dp\pgfnodeparttextbox%
\pgfmathsetlength\pgf@yb{\pgfkeysvalueof{/pgf/inner ysep}}%
\advance\pgf@y by\pgf@yb%
%
% Caculate ``width radius''
%
\pgf@x=.5\wd\pgfnodeparttextbox%
\pgfmathsetlength\pgf@xb{\pgfkeysvalueof{/pgf/inner xsep}}%
\advance\pgf@x by\pgf@xb%
%
% Adjust
%
\pgf@x=1.4142136\pgf@x%
\pgf@y=1.4142136\pgf@y%
%
% Adjust height, if necessary
%
\pgfmathsetlength\pgf@yc{\pgfkeysvalueof{/pgf/minimum height}}%
\ifdim\pgf@y<.5\pgf@yc%
\pgf@y=.5\pgf@yc%
\fi%
%
% Adjust width, if necessary
%
\pgfmathsetlength\pgf@xc{\pgfkeysvalueof{/pgf/minimum width}}%
\ifdim\pgf@x<.5\pgf@xc%
\pgf@x=.5\pgf@xc%
\fi%
%
% Add outer sep
%
\pgfmathsetlength{\pgf@xb}{\pgfkeysvalueof{/pgf/outer xsep}}%
\pgfmathsetlength{\pgf@yb}{\pgfkeysvalueof{/pgf/outer ysep}}%
\advance\pgf@x by\pgf@xb%
\advance\pgf@y by\pgf@yb%
}
% Anchors
\anchor{center}{\centerpoint}
\anchor{mid}{\centerpoint\pgfmathsetlength\pgf@y{.5ex}}
\anchor{base}{\centerpoint\pgf@y=0pt}
\anchor{north}
{
\pgf@process{\radius}
\pgf@ya=\pgf@y%
\pgf@process{\centerpoint}
\advance\pgf@y by\pgf@ya
}
\anchor{south}
{
\pgf@process{\radius}
\pgf@ya=\pgf@y%
\pgf@process{\centerpoint}
\advance\pgf@y by-\pgf@ya
}
\anchor{west}
{
\pgf@process{\radius}
\pgf@xa=\pgf@x%
\pgf@process{\centerpoint}
\advance\pgf@x by-\pgf@xa
}
\anchor{mid west}
{%
\pgf@process{\radius}
\pgf@xa=\pgf@x%
\pgf@process{\centerpoint}
\advance\pgf@x by-\pgf@xa%
\pgfmathsetlength\pgf@y{.5ex}
}
\anchor{base west}
{%
\pgf@process{\radius}
\pgf@xa=\pgf@x%
\pgf@process{\centerpoint}
\advance\pgf@x by-\pgf@xa%
\pgf@y=0pt
}
\anchor{north west}
{
\pgf@process{\radius}
\pgf@xa=\pgf@x%
\pgf@ya=\pgf@y%
\pgf@process{\centerpoint}
\advance\pgf@x by-0.707107\pgf@xa
\advance\pgf@y by0.707107\pgf@ya
}
\anchor{south west}
{
\pgf@process{\radius}
\pgf@xa=\pgf@x%
\pgf@ya=\pgf@y%
\pgf@process{\centerpoint}
\advance\pgf@x by-0.707107\pgf@xa
\advance\pgf@y by-0.707107\pgf@ya
}
\anchor{east}
{%
\pgf@process{\radius}
\pgf@xa=\pgf@x%
\pgf@process{\centerpoint}
\advance\pgf@x by\pgf@xa
}
\anchor{mid east}
{%
\pgf@process{\radius}
\pgf@xa=\pgf@x%
\pgf@process{\centerpoint}
\advance\pgf@x by\pgf@xa%
\pgfmathsetlength\pgf@y{.5ex}
}
\anchor{base east}
{%
\pgf@process{\radius}
\pgf@xa=\pgf@x%
\pgf@process{\centerpoint}
\advance\pgf@x by\pgf@xa%
\pgf@y=0pt
}
\anchor{north east}
{
\pgf@process{\radius}
\pgf@xa=\pgf@x%
\pgf@ya=\pgf@y%
\pgf@process{\centerpoint}
\advance\pgf@x by0.707107\pgf@xa
\advance\pgf@y by0.707107\pgf@ya
}
\anchor{south east}
{
\pgf@process{\radius}
\pgf@xa=\pgf@x%
\pgf@ya=\pgf@y%
\pgf@process{\centerpoint}
\advance\pgf@x by0.707107\pgf@xa
\advance\pgf@y by-0.707107\pgf@ya
}
\anchorborder{
\edef\pgf@marshal{%
\noexpand\pgfpointborderellipse
{\noexpand\pgfqpoint{\the\pgf@x}{\the\pgf@y}}
{\noexpand\radius}%
}%
\pgf@marshal%
\pgf@xa=\pgf@x%
\pgf@ya=\pgf@y%
\centerpoint%
\advance\pgf@x by\pgf@xa%
\advance\pgf@y by\pgf@ya%
}
%
% Background path
%
\backgroundpath
{
\pgf@process{\radius}%
\pgfutil@tempdima=\pgf@x%
\pgfutil@tempdimb=\pgf@y%
\pgfmathsetlength{\pgf@xb}{\pgfkeysvalueof{/pgf/outer xsep}}%
\pgfmathsetlength{\pgf@yb}{\pgfkeysvalueof{/pgf/outer ysep}}%
\advance\pgfutil@tempdima by-\pgf@xb%
\advance\pgfutil@tempdimb by-\pgf@yb%
\batmanx=\pgfutil@tempdima%
\batmany=\pgfutil@tempdimb%
\pgfpathellipse{\centerpoint}
{\pgfqpoint{\pgfutil@tempdima}{0pt}}
{\pgfqpoint{0pt}{\pgfutil@tempdimb}}%
\pgfsetfillopacity{.5}
\pgfsetfillcolor{yellow}
\pgfusepath{fill,stroke}
\pgfsetlinewidth{0.05\pgfutil@tempdima}%
\pgfutil@tempdima=0.90\pgfutil@tempdima%
\pgfutil@tempdimb=0.90\pgfutil@tempdimb%
\pgfpathellipse{\centerpoint}{\pgfqpoint{\pgfutil@tempdima}{0pt}}
{\pgfqpoint{0pt}{\pgfutil@tempdimb}}%
\pgfusepath{stroke}
\pgfsetlinewidth{0.4 pt}
\pgftransformcm{1}{0}{0}{1}{\centerpoint}
\pgfpathmoveto{\pgfpoint{0 cm}{0.66\batmany}}
\pgfpathlineto{\pgfqpoint{0.07\batmanx}{0.66\batmany}}
\pgfpathlineto{\pgfqpoint{0.14\batmanx}{0.793\batmany}}
\pgfpathcurveto{\pgfqpoint{0.17\batmanx}{0.317\batmany}}
{\pgfqpoint{0.186\batmanx}{0.24\batmany}}
{\pgfqpoint{0.28\batmanx}{0.24\batmany}}
\pgfpathcurveto{\pgfqpoint{0.42\batmanx}{0.24\batmany}}
{\pgfqpoint{0.42\batmanx}{0.537\batmany}}
{\pgfqpoint{0.28\batmanx}{0.756\batmany}}
\pgfpatharcto{0.84\batmanx}{0.80\batmany}{0}{0}{0}
{\pgfqpoint{0.457\batmanx}{-0.683\batmany}}
\pgfpathcurveto{\pgfqpoint{0.56\batmanx}{-0.488\batmany}}
{\pgfqpoint{0.56\batmanx}{0 cm}}
{\pgfqpoint{0.314\batmanx}{-0.44\batmany}}
\pgfpathcurveto{\pgfqpoint{0.214\batmanx}{-0.24\batmany}}
{\pgfqpoint{0.14\batmanx}{-0.24\batmany}}
{\pgfqpoint{0 cm}{-0.78\batmany}}
\pgftransformcm{-1}{0}{0}{1}{\pgfpointorigin}
\pgfpathcurveto{\pgfpoint{0.14\batmanx}{-0.24\batmany}}
{\pgfpoint{0.214\batmanx}{-0.24\batmany}}
{\pgfpoint{0.314\batmanx}{-0.44\batmany}}
\pgfpathcurveto{\pgfpoint{0.56\batmanx}{0 cm}}
{\pgfpoint{0.56\batmanx}{-0.488\batmany}}
{\pgfpoint{0.457\batmanx}{-0.683\batmany}}
\pgfpatharcto{0.84\batmanx}{0.80\batmany}{0}{0}{1}
{\pgfpoint{0.28\batmanx}{0.756\batmany}}
\pgfpathcurveto{\pgfpoint{0.42\batmanx}{0.537\batmany}}
{\pgfpoint{0.42\batmanx}{0.24\batmany}}
{\pgfpoint{0.28\batmanx}{0.24\batmany}}%
\pgfpathcurveto{\pgfqpoint{0.186\batmanx}{0.24\batmany}}
{\pgfqpoint{0.17\batmanx}{0.317\batmany}}
{\pgfqpoint{0.14\batmanx}{0.793\batmany}}
\pgfpathlineto{\pgfqpoint{0.07\batmanx}{0.66\batmany}}%
\pgfpathmoveto{\pgfpoint{0 cm}{0.66\batmany}}
\pgfsetfillopacity{1}%
\pgfsetfillcolor{black}%
\pgfusepath{fill,stroke}
\pgftransformcm{-1}{0}{0}{1}{\centerpoint}%
\pgfsetlinewidth{0.4pt}%
}
}
\Huge
\begin{tikzpicture}
\node[name=s,shape=batman,minimum height=8.2cm,minimum width=14cm] {\color{red}Batman\vrule width 1pt height 2cm};
\foreach \anchor/\placement in
{north west/above left, north/above, north east/above right,
west/left, center/above, east/right,
mid west/right, mid/above, mid east/left,
base west/left, base/below, base east/right,
south west/below left, south/below, south east/below right,
text/left, 10/right, 130/above}
\draw[shift=(s.\anchor)] plot[mark=x] coordinates{(0,0)}
node[\placement] {\color{red}\scriptsize\texttt{(s.\anchor)}};
\end{tikzpicture}
\end{document}
With the next code the results are correct
\begin{tikzpicture}
\node[draw,shape=batman,minimum height=4.1cm,minimum width=7cm,text=white] (A) {\Large Bat me up};
\node[draw,shape=batman,minimum height=8.2cm,minimum width=14cm,text=white] (B) at ([yshift=-12cm]A) {\Huge Bat me down };
\draw [red,ultra thick,double,->](A) --(B);
\end{tikzpicture}
and with
\begin{tikzpicture}
\node[draw,shape=batman,text=white] (A) {\Large Bat me up};
\node[draw,shape=batman,text=white] (B) at ([yshift=-3cm]A) {\Huge Bat me down };
\draw [red,ultra thick,double,->](A) --(B);
\end{tikzpicture}
it's very bad (ratio text etc.)

left/right top/bottom wing,tail,left/right horn(et). The transformcm needs additional work as it does not handle nested transforms, as such you need a group to be sure to not disturb any user transforms. – nickpapior Mar 09 '12 at 22:54\pgftransformcm{a}{b}{c}{d}{coord}works as a matrix vector product. Every vector in the 2D plane, supposex=(x1 \\ x2), is computed as[a &c \\ b &d]*(x1\\ x2) + (coord1 \\ coord2). In my transformation I just use the matrix[-1 &0 \\ 0 &1](x1\\x2)+( 0\\ 0)so only horizontal component of the vector gets affected. – percusse Mar 10 '12 at 00:09\pgftransformshift{\centerpoint}for your first question. If you use\begin{pgfscope} .... \end{scope}inside the backgroundpath code, the transformations don't affect the textbox. So you can remove the last transformation. – percusse Mar 10 '12 at 02:33\inheritsavedanchorsseems more appropriate for a general purpose question. – nickpapior Mar 13 '12 at 07:40\inheritsavedanchors. – Alain Matthes Mar 13 '12 at 07:44