Skip to content

Commit 3d2f9a0

Browse files
authored
Merge pull request #2 from AlexKnauth/opaque-positive-predicate
switch cond order, Color before Bitmap-Pattern
2 parents ceabcd1 + baa38a7 commit 3d2f9a0

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

bitmap/digitama/base.rkt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
(provide (all-defined-out))
44

55
(define-type Color (U Symbol Integer FlColor))
6+
(define-predicate color? Color)
67

78
(struct paint () #:transparent #:type-name Paint)
89
(struct flcolor () #:transparent #:type-name FlColor)

bitmap/digitama/source.rkt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,8 +25,8 @@
2525
(define fill-paint->source : (-> Fill-Paint Bitmap-Source)
2626
(lambda [paint]
2727
(cond [(bitmap? paint) (bitmap-surface paint)]
28-
[(bitmap-pattern? paint) paint]
29-
[else (rgb* paint)])))
28+
[(color? paint) (rgb* paint)]
29+
[else paint])))
3030

3131
(define fill-paint->source* : (-> (Option Fill-Paint) (Option Bitmap-Source))
3232
(lambda [paint]

0 commit comments

Comments
 (0)