diff options
author | Ricardo Wurmus <rekado@elephly.net> | 2018-04-06 18:18:34 +0200 |
---|---|---|
committer | Ricardo Wurmus <rekado@elephly.net> | 2018-04-06 18:18:34 +0200 |
commit | b033d698ed53d5fac2865c73cf79f08d4dd3cf7a (patch) | |
tree | be2ff8e40e1ee7fd51b201bd0e35d501fc6b48d4 | |
parent | e5df409e75b942ba89e4c9dfc4a8ab2a7877ebd9 (diff) |
Limit circle border width.
-rw-r--r-- | pict.scm | 8 |
1 files changed, 5 insertions, 3 deletions
@@ -531,7 +531,9 @@ strings that are built from the list of attributes LST." #:key (border-color "black") (border-width 1)) - (let ((radius (- (/ size 2) border-width))) + (let* ((border-width (min border-width (/ size 2))) + (radius (exact->inexact + (/ (- size border-width) 2)))) (make-pict `(svg (@ (width ,size) (height ,size) @@ -542,8 +544,8 @@ strings that are built from the list of attributes LST." ("stroke" ,border-color) ("stroke-width" ,(number->string border-width))))) - (cx ,(+ radius border-width)) - (cy ,(+ radius border-width)) + (cx ,(+ radius (/ border-width 2))) + (cy ,(+ radius (/ border-width 2))) (r ,radius))))))) (define* (disk size |