Created
November 1, 2012 12:40
-
-
Save ihercowitz/3993410 to your computer and use it in GitHub Desktop.
Gerador de um livreto para o aniversario da alicia
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#lang racket | |
(require slideshow) | |
(set-page-numbers-visible! #f) | |
(define (build-booklet images) | |
(unless (null? images) | |
(let ([page-left (car images)] | |
[page-right (cadr images)] | |
) | |
(slide | |
(ht-append | |
10 | |
(vl-append | |
(scale (bitmap (string-append "c:/temp/borderless/" page-left)) 0.7) | |
) | |
(blank 120) | |
(vr-append | |
(scale (bitmap (string-append "c:/temp/borderless/" page-right)) 0.7) | |
))) (build-booklet (cddr images))))) | |
;First and last pages - They could have some title on it | |
(slide | |
(ht-append | |
10 | |
(vl-append | |
(para #:align 'center #:width 350 (text "Obrigado por ter vindo!" (current-main-font) 36)) | |
(scale (bitmap (string-append "c:/temp/borderless/" "Minnie/minnie-mouse-30.jpg")) 0.7) | |
) | |
(blank 120) | |
(vr-append | |
(para #:align 'center #:width 300 (text "Meu 2o aniversário" (current-main-font) 36)) | |
(para #:align 'center #:width 300 (text "Alícia" (current-main-font) 36)) | |
(scale (bitmap (string-append "c:/temp/borderless/" "minnie/minnie-mouse-16.jpg")) 0.7)))) | |
(build-booklet '("Mickey/mickey-99.jpg" "Pluto/pluto-18.jpg" | |
"Mickey/mickey-120.jpg" "Minnie/minnie-mouse-46.jpg" | |
"Mickey/mickey-117.jpg" "Minnie/minnie-mouse-23.jpg" | |
"Goofy/goofy-37.jpg" "Mickey/mickey48.jpg" | |
"Donald/donald-97.jpg" "Minnie/minnie-mouse-22.jpg" | |
"Mickey/mickey17.jpg" "Mickey/mickey-105.jpg" | |
"Mickey/mickey-116.jpg" "Daisy/daisy-02.jpg" | |
)) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment