[cl-pdf-devel] Adding options to x-axis

Marc Battyani marc.battyani at fractalconcept.com
Fri Jan 20 22:51:55 UTC 2006


"Jonathon McKitrick" <jcm at FreeBSD-uk.eu.org> wrote:

> On Thu, Jan 19, 2006 at 08:51:37PM +0100, Marc Battyani wrote:
> : For 1, use a format string with the Tilde Slash directive:
> : http://www.lisp.org/HyperSpec/Body/sec_22-3-5-4.html
>
> What an awesome feature!  Extensible format strings!

Yep, Common Lisp is cool! ;-)

> I have a lisp style question about the code.  What is the purpose of
> (apply #'set-rgb-fill (foo bar))
>
> when you could just call
> (set-rgb-fill (foo bar))
> ?
>
> I don't quite get the apply here, as well as when it is used with
> make-instance.

It's not the same:

CL-USER 12 > (apply 'pdf:set-rgb-fill '(1 2 3))
"  1.0   2.0   3.0 rg
"

CL-USER 13 > (pdf:set-rgb-fill '(1 2 3))

Error: The call (#<function pdf:set-rgb-fill 20784E6A> (1 2 3)) does not match definition
(#<function pdf:set-rgb-fill 20784E6A> pdf::r pdf::g pdf::b).
  1 (continue) Return a value from the call to #<function pdf:set-rgb-fill 20784E6A>.
  2 Try calling another function instead of #<function pdf:set-rgb-fill 20784E6A> with the
same arguments.
  3 Try calling #<function pdf:set-rgb-fill 20784E6A> with a new argument list.
  4 (abort) Return to level 0.
  5 Return to top loop level 0.

Marc






More information about the cl-pdf-devel mailing list