diff options
-rw-r--r-- | pict.scm | 24 |
1 files changed, 15 insertions, 9 deletions
@@ -649,15 +649,21 @@ override the line color and line thickness." #:key (border-color "black") (border-width 1)) - (let ((third (exact->inexact (/ size 3)))) - (polygon `((0 . ,(* 2 third)) - (0 . ,third) - (,third . 0) - (,(* 2 third) . 0) - (,size . ,third) - (,size . ,(* 2 third)) - (,(* 2 third) . ,size) - (,third . ,size)) + "Return an octagon (more accurately a p8 symmetric isogonal octagon) +with a maximum width of SIZE. The keys BORDER-COLOR (a string) and +BORDER-WIDTH (a number) are accepted to override the default line +color and line thickness." + (let* ((half-line-width (exact->inexact (/ border-width 2))) + (size* (- size half-line-width)) + (third (exact->inexact (/ size 3)))) + (polygon `((,half-line-width . ,(* 2 third)) + (,half-line-width . ,third) + (,third . ,half-line-width) + (,(* 2 third) . ,half-line-width) + (,size* . ,third) + (,size* . ,(* 2 third)) + (,(* 2 third) . ,size*) + (,third . ,size*)) #:border-color border-color #:border-width border-width))) |