diff options
author | David Thompson <dthompson2@worcester.edu> | 2022-12-13 08:35:24 -0500 |
---|---|---|
committer | David Thompson <dthompson2@worcester.edu> | 2022-12-14 12:57:02 -0500 |
commit | 3946134e5d9e153461abe219ebc5b0721aaeb7e7 (patch) | |
tree | 10a33a2553c48977a00ac1bbf890d2ecc6054194 | |
parent | cc5ebcff8824035288ef2ba846751a52520a587e (diff) |
region: Add width/height methods.
-rw-r--r-- | catbird/region.scm | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/catbird/region.scm b/catbird/region.scm index b666811..f1cc306 100644 --- a/catbird/region.scm +++ b/catbird/region.scm @@ -66,9 +66,15 @@ (define-method (area-width (region <region>)) (rect-width (area region))) +(define-method (width (region <region>)) + (area-width region)) + (define-method (area-height (region <region>)) (rect-height (area region))) +(define-method (height (region <region>)) + (area-height region)) + (define (float->int x) (inexact->exact (round x))) |