You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
typesetting/pitfall/pktest/test1.rkt

18 lines
431 B
Racket

#lang br
(require pitfall/kit/document pitfall/kit/helper)
;; Create a new PDFDocument
(define doc (new PDFDocument))
(send doc pipe (open-output-file "test1rkt.pdf" #:exists 'replace))
;; Draw a triangle and a circle
(send*/fold doc [save]
[moveTo 100 150]
[lineTo 100 250]
[lineTo 200 250]
[fill "#FF3300"])
(send*/fold doc [circle 280 200 50] [fill "#6600FF"])
(send doc end)