summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRicardo Wurmus <rekado@elephly.net>2019-02-10 08:54:15 +0100
committerRicardo Wurmus <rekado@elephly.net>2019-02-10 08:54:15 +0100
commitc2934efc9d09d90b16877ed77cfe24496d4e15d7 (patch)
tree880828f2d13674aab5f18ca328579c4207ff1c79
parent196b59fd4487acdf619a17e378da1d6e540fe527 (diff)
pict: pict-width, pict-height: Default to 150.
* pict.scm (pict-width, pict-height): Return 150 if there's no declared height or width.
-rw-r--r--pict.scm6
1 files changed, 4 insertions, 2 deletions
diff --git a/pict.scm b/pict.scm
index 04578e7..579cde3 100644
--- a/pict.scm
+++ b/pict.scm
@@ -752,7 +752,8 @@ of the SVG of PICT or #F."
;; Take value up to unit and convert to number
(let ((index (string-skip s char-set:digit)))
(string->number (substring s 0 index))))
- ((? number? n) n)))
+ ((? number? n) n)
+ (_ 150)))
(define (pict-width pict)
"Return the numeric width of PICT."
@@ -761,7 +762,8 @@ of the SVG of PICT or #F."
;; Take value up to unit and convert to number
(let ((index (string-skip s char-set:digit)))
(string->number (substring s 0 index))))
- ((? number? n) n)))
+ ((? number? n) n)
+ (_ 150)))
(define (pict-rotation pict)
"Return the rotation of PICT."