From 50c4c80817daa41d81f5dd48e37a9cda072d1225 Mon Sep 17 00:00:00 2001 From: Matthew Butterick Date: Tue, 9 May 2017 19:28:18 -0700 Subject: [PATCH] tweak --- pitfall/pitfall/kit/document.rkt | 21 +++++++++------------ 1 file changed, 9 insertions(+), 12 deletions(-) diff --git a/pitfall/pitfall/kit/document.rkt b/pitfall/pitfall/kit/document.rkt index 3a90f13b..ac0f82f8 100644 --- a/pitfall/pitfall/kit/document.rkt +++ b/pitfall/pitfall/kit/document.rkt @@ -4,18 +4,15 @@ (define PDFDocument (class pdf-dc% - (init [opts (hasheq)]) - - (define options opts) - (define output-file (hash-ref options 'out "outrkt.pdf")) - - (super-new [interactive #f] - [parent #f] - [use-paper-bbox #f] - [as-eps #f] - [width #f] - [height #f] - [output (open-output-file output-file #:exists 'replace)]) + (init-field [options (hasheq)]) + (let ([output-file (hash-ref options 'out "outrkt.pdf")]) + (super-new [interactive #f] + [parent #f] + [use-paper-bbox #f] + [as-eps #f] + [width #f] + [height #f] + [output (open-output-file output-file #:exists 'replace)])) ;; PDF version (field [version 1.3])