EQL5/examples/M-modules/quick/palindrome-2/generate-qml.lisp
2017-06-21 21:13:29 +02:00

22 lines
692 B
Common Lisp

;;; generates QML file for animation (see "definitions.lisp")
(require :utils "utils")
(require :qml-file "qml-file")
;; qml file
(with-qml-file ("qml/palindrome.qml")
"import QtQuick 2.0"
"import 'ext/' as Ext"
(qml "Rectangle"
"width: 527; height: 527"
"color: 'black'"
(let ((num 0))
(mapc (lambda (char xy)
(incf num)
(qml "Ext.PalindromeImage { objectName: 'img~D'; source: 'img/~A.png'; x: ~D; y: ~D }"
num
(image-of-char char)
(* 31 (first xy))
(* 31 (second xy))))
*chars* (first *move-to-positions*)))))