Home > Net >  how to pass a .png file as parameter in clisp function
how to pass a .png file as parameter in clisp function

Time:10-08

As I am new to lisp and the whole vecto package it provides I had this basic doubt. I am using the function radiant-lambda

(defun radiant-lambda (file)
  (with-canvas (:width 80 :height 80) 
    (let ((font (get-font "times.ttf"))
      (step (/ pi 7)))
      (set-font font 40)
      (translate 45 45)
      (draw-centered-string 0 -10 #(#x3BB))
      (set-rgb-stroke 1 0 0)
      (centered-circle-path 0 0 35)
      (stroke)
      (set-rgba-stroke 0 0 1.0 0.5)
      (set-line-width 4)
      (dotimes (i 14)
    (with-graphics-state 
        (rotate (* i step))
      (move-to 30 0)
      (line-to 40 0)
      (stroke)))
      (save-png file))))

so how do I call this function?

CodePudding user response:

The "general lisp" answer is that you call a function like this:

(radiant-lambda "/path/to/my/file.png")

and at the REPL prompt.

  • Related