From 1d6f430b10f90b42220125af98829b3ddbe1eed2 Mon Sep 17 00:00:00 2001 From: Thomas White Date: Thu, 15 Jun 2023 22:34:51 +0200 Subject: Remove colour-component stuff It's a bit of a hack, only needed for MIDI control. I have a better solution using OSC in mind. --- guile/starlet/colours.scm | 45 +-------------------------------------------- 1 file changed, 1 insertion(+), 44 deletions(-) (limited to 'guile/starlet/colours.scm') diff --git a/guile/starlet/colours.scm b/guile/starlet/colours.scm index cf71567..2162322 100644 --- a/guile/starlet/colours.scm +++ b/guile/starlet/colours.scm @@ -37,13 +37,7 @@ blue interpolate-colour - white - - - colour-component-id? - colour-component-id - get-colour-component - extract-colour-component)) + white)) (define-class () @@ -167,40 +161,3 @@ (make-exception-with-message "Unrecognised colour interpolation type") (make-exception-with-irritants interpolation-type)))))) - - -(define-class () - (component - #:init-form (error "Colour component must be specified") - #:init-keyword #:component - #:getter get-colour-component)) - - -(define (colour-component-id? a) - (is-a? a )) - - -(define (colour-component-id a) - (make - #:component a)) - - -(define (extract-colour-component col component-id) - (cond - ((eq? (get-colour-component component-id) 'cyan) - (cyan (colour-as-cmy col))) - ((eq? (get-colour-component component-id) 'magenta) - (magenta (colour-as-cmy col))) - ((eq? (get-colour-component component-id) 'yellow) - (yellow (colour-as-cmy col))) - ((eq? (get-colour-component component-id) 'red) - (red (colour-as-rgb col))) - ((eq? (get-colour-component component-id) 'green) - (green (colour-as-rgb col))) - ((eq? (get-colour-component component-id) 'blue) - (blue (colour-as-rgb col))) - (else (raise-exception (make-exception - (make-exception-with-message - "Invalid colour component ID") - (make-exception-with-irritants - (get-colour-component component-id))))))) -- cgit v1.2.3