some 2htdp/image equality clarification

This commit is contained in:
Robby Findler 2013-07-03 02:19:31 -05:00
parent 883cdfe701
commit b36a09be6d
2 changed files with 7 additions and 1 deletions

View File

@ -479,7 +479,7 @@ color in it:
(rectangle 100 100 'solid (make-color 1 1 1 50))
(rectangle 100 100 'solid (make-color 2 2 2 50)))]
To understand why, we must look more carefully at how alpha blending
and image equality work. Image equality is straightforward: two images
and image equality work. Image equality's definition is straightforward: two images
are equality if they are both drawn the same. That is, image equality
is defined by simply drawing the two shapes on a white background and
then comparing all of the pixels for the two drawings

View File

@ -1600,6 +1600,12 @@ Two images are @racket[equal?] if they draw exactly the same way at their curren
(not necessarily at all sizes) and, if there are pinholes, the pinholes are
in the same place.
This can lead to some counter-intuitive results. For example, two completely shapes that
are the same size and are drawn with the transparent color are equal:
@image-examples[(equal? (circle 30 "solid" "transparent")
(square 60 "solid" "transparent"))]
See also @secref["nitty-gritty-alpha"].
@section[#:tag "pinholes"]{Pinholes}
A pinhole is an optional property of an image that identifies a point somewhere