summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRicardo Wurmus <rekado@elephly.net>2018-04-06 18:19:14 +0200
committerRicardo Wurmus <rekado@elephly.net>2018-04-06 18:19:14 +0200
commit1238cc5fe7c59e276c92e5c5935744501f659c44 (patch)
tree3226e284f5aa9dc8862b066dffcef27efb46883a
parentb033d698ed53d5fac2865c73cf79f08d4dd3cf7a (diff)
append-align: Use inexact numbers in modifiers.
-rw-r--r--pict.scm20
1 files changed, 12 insertions, 8 deletions
diff --git a/pict.scm b/pict.scm
index 36f61c9..ae9fe01 100644
--- a/pict.scm
+++ b/pict.scm
@@ -679,21 +679,25 @@ the symbol XALIGN."
'x (match xalign
('left identity)
('center (lambda _
- (- (/ new-width 2)
- (/ (pict-width pict) 2))))
+ (exact->inexact
+ (- (/ new-width 2)
+ (/ (pict-width pict) 2)))))
('right (lambda _
- (- new-width
- (pict-width pict))))
+ (exact->inexact
+ (- new-width
+ (pict-width pict)))))
('offset (const xoffset))))
(attribute-modifier
'y (match yalign
('top identity)
('center (lambda _
- (- (/ new-height 2)
- (/ (pict-height pict) 2))))
+ (exact->inexact
+ (- (/ new-height 2)
+ (/ (pict-height pict) 2)))))
('bottom (lambda _
- (- new-height
- (pict-height pict))))
+ (exact->inexact
+ (- new-height
+ (pict-height pict)))))
('offset (const yoffset)))))
(pict-sxml pict))))))
(make-pict