[pstricks] how to get absolute coordinates
Herbert Voss
Herbert.Voss at alumni.TU-Berlin.DE
Wed Jul 7 14:39:47 CEST 2004
Franco Bagnoli wrote:
> I'm developing an optical mark reader system, and I need to know the
> absolute position of marks on the paper. Since the placement of marks is
> left to the author, using a latex macro, I though that the best is to
> include a postscript fragment in the macro to print the absolute
> coordinates to a file.
>
> The only problem I have is how to convert the 'currentpoint' coordinates
> to absolute ones (i.e. the ones displayed by gv). I'm not very fluent in
> postscript, and maybe someone has the needed information at hand.
all nodes are saved with their coordinates in the
matrix NodeMtrx as
N@<name> x y
Use the \rnode{A}{stuff} to mark any Position. Create a ps file.
Then you can write into your ps-file and the end of the document
which is nearly the same than the end of the ps file
tx at Dict begin
tx at NodeDict begin
/N at A load GetCenter
/N at B load GetCenter
pstack
end
end
now run this doc with gs and the coordinates of the
two Nodes A and B are listed, e.g. for my example
1066.63416
1205.01978
494.633972
1205.01978
Herbert
--
http://TeXnik.de/
http://PSTricks.de/
ftp://ftp.dante.de/tex-archive/info/math/voss/Voss-Mathmode.pdf
http://www.dante.de/faq/de-tex-faq/
http://www.tex.ac.uk/cgi-bin/texfaq2html?introduction=yes
More information about the PSTricks
mailing list