Minor tweaks to documentation and rotating-triangle test.
This commit is contained in:
parent
7069a267a6
commit
f3352794d8
|
@ -211,7 +211,7 @@ produces a copy of @racket[my-picture] with all the red leached out,
|
|||
leaving only the blue and green components.
|
||||
|
||||
Since @racket[make-color] with three arguments defaults alpha to 255,
|
||||
this function discards any alpha information (including edge-dithering)
|
||||
this definition of @racket[lose-red] discards any alpha information (including edge-dithering)
|
||||
that was in the original image. To preserve this information, one could write
|
||||
@racketblock[
|
||||
(define (lose-red-but-not-alpha x y old-color)
|
||||
|
|
|
@ -18,7 +18,14 @@
|
|||
(define (rotate-1 pic)
|
||||
(rotate 1 pic))
|
||||
|
||||
(big-bang badtricirc
|
||||
"Triangle rotating around its center:"
|
||||
(big-bang tricirc
|
||||
(on-tick rotate-1 .05)
|
||||
(check-with image?)
|
||||
(on-draw show-it))
|
||||
|
||||
"Triangle rotating around the center of its bounding box:"
|
||||
(big-bang badtricirc
|
||||
(on-tick rotate-1 .05)
|
||||
(check-with image?)
|
||||
(on-draw show-it))
|
||||
|
|
Loading…
Reference in New Issue
Block a user