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.
|
leaving only the blue and green components.
|
||||||
|
|
||||||
Since @racket[make-color] with three arguments defaults alpha to 255,
|
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
|
that was in the original image. To preserve this information, one could write
|
||||||
@racketblock[
|
@racketblock[
|
||||||
(define (lose-red-but-not-alpha x y old-color)
|
(define (lose-red-but-not-alpha x y old-color)
|
||||||
|
|
|
@ -18,6 +18,13 @@
|
||||||
(define (rotate-1 pic)
|
(define (rotate-1 pic)
|
||||||
(rotate 1 pic))
|
(rotate 1 pic))
|
||||||
|
|
||||||
|
"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
|
(big-bang badtricirc
|
||||||
(on-tick rotate-1 .05)
|
(on-tick rotate-1 .05)
|
||||||
(check-with image?)
|
(check-with image?)
|
||||||
|
|
Loading…
Reference in New Issue
Block a user