You are right that
\pgfdeclareshape saves it as a macro rather than a length. Why this is, I don't know (but I guess that it's because it's easier to create lots of new macros than lots of new lengths). This isn't a problem so long as you are aware of it. You just have to remember to do your mathematics on macros rather than lengths. Fortunately,
\pgfpoint passes its arguments through the PGFMath stuff and so all you actually need to do in this example is add a multiplication:
\pgf@x = 10pt
(Ignoring the error about missing anchors!) This produces three lines, the top one is the one you want, the middle is your original one, and the lower one is the "reference" line to show that the top one is, indeed, twice the lower one.
If you were using
\pgfqpoint - which is faster than
\pgfpoint - then you would have to worry about converting from macros to lengths because that doesn't use PGFMath. In this case, you could do something like:
to get the same effect.