In the stamp class example in the pgfmanual, the position for the stamp is passed in as two separate numbers, an x coordinate and a y coordinate. Is it possible, instead, to pass in a coordinate or a 'point' of some kind?
@percusse I have made some progress since I posted the question but it's not very elegant. I would welcome pointers on a better way to get the coordinates into the class.
\documentclass{article}
\usepackage{tikz}
\usepgfmodule{oo}
%http://tex.stackexchange.com/questions/33703/extract-x-y-coordinate-of-an-arbitrary-point-in-tikz
\makeatletter
\newcommand{\gettikzxy}[3]{%
\tikz@scan@one@point\pgfutil@firstofone#1\relax
\edef#2{\the\pgf@x}%
\edef#3{\the\pgf@y}%
}
\makeatother
\pgfooclass{rr}{
\method rr(#1,#2) { % The constructor; everything is done in here
% This doesn't seem to work
% \def\start{#1} % nor \def\start{(#1)}
% But here I can get named x and y coordinates
\gettikzxy{(#1)}{\spx}{\spy}
\gettikzxy{(#2)}{\epx}{\epy}
% I'd like named points to work with
\coordinate (Start) at (\spx, \spy);
\coordinate (End) at (\epx, \epy);
\draw (Start) -- (End) node[right] {It works!};
}
}
\begin{document}
\begin{tikzpicture}
\coordinate (A) at (0,0);
\coordinate (B) at (0,-1);
\def\hi{0.25}
\pgfoonew \AB=new rr(A,B);
\fill (A) circle (3pt);
\fill (B) circle (3pt);
\end{tikzpicture}
\end{document}
I am refactoring some code I wrote years ago. This is where I'm going:

\coordinate (start) at (#1);? I'm missing something obvious, I guess .... – cfr Oct 13 '16 at 21:58