[cl-pdf-devel] Eliminating ratios and naming coordinate parameter
Dmitri Ivanov
divanov at aha.ru
Mon Feb 7 14:17:51 UTC 2005
Hello,
If we want to operate freely on rational numbers as coordinate values, e.g.
when calling pdf:add-link, we do need something like the following:
(defmethod write-object ((number ratio) &optional root-level)
(declare (ignorable root-level))
(format *pdf-stream* "~,3f" number))
I have got another complaint :-( It is about naming coordinate parameters
of various functions. Every time I see
(draw-block content x y dx dy ...),
I manage to remember that x is left, dx is width, dy is height. But
remembering what y means, top or bottom, is a real pain IMHO.
Is there any consistency rule?
Could we rewrite definitions like the above to
(defun draw-block content left top dx dy ...) ?
--
Sincerely,
Dmitri Ivanov
lisp.ystok.ru
More information about the cl-pdf-devel
mailing list