adjust picturing-programs to make declarations so that scribble can find the documented things

This commit is contained in:
Robby Findler 2011-04-26 14:05:27 -05:00
parent d066175867
commit 2a7ca22a16
3 changed files with 23 additions and 6 deletions

View File

@ -5,7 +5,7 @@
(require (only-in 2htdp/image bitmap)) (require (only-in 2htdp/image bitmap))
(provide (all-defined-out)) (provide (prefix-out pic: (all-defined-out)))
(define bloch (bitmap "pictures/bloch.jpg")) (define bloch (bitmap "pictures/bloch.jpg"))
(define hieroglyphics (bitmap "pictures/small_hieroglyphics.png")) (define hieroglyphics (bitmap "pictures/small_hieroglyphics.png"))

View File

@ -10,7 +10,7 @@
(all-from-out picturing-programs/io-stuff) ; includes with-{input-from,output-to}-{string,file}, with-io-strings (all-from-out picturing-programs/io-stuff) ; includes with-{input-from,output-to}-{string,file}, with-io-strings
(all-from-out picturing-programs/map-image) (all-from-out picturing-programs/map-image)
; includes (map,build)(3,4,)-image, real->int, name->color, colorize, get-pixel-color ; includes (map,build)(3,4,)-image, real->int, name->color, colorize, get-pixel-color
(prefix-out pic: (all-from-out picturing-programs/book-pictures)) ; pic:calendar, pp:hacker, etc. (all-from-out picturing-programs/book-pictures) ; pic:calendar, pp:hacker, etc.
(all-from-out 2htdp/universe) (all-from-out 2htdp/universe)
show-it) show-it)

View File

@ -37,11 +37,14 @@ and running interactive animations.
It's intended to be used with the textbook It's intended to be used with the textbook
@hyperlink["http://www.picturingprograms.com" "Picturing Programs"]. @hyperlink["http://www.picturingprograms.com" "Picturing Programs"].
@defproc[(show-it [img image?])
image?]{Returns the given image unaltered. Useful as a draw handler for animations whose model is an image.}
@section{Installation} @section{Installation}
This package should be bundled with DrRacket version 5.1 and later, so there should be This package should be bundled with DrRacket version 5.1 and later, so there should be
no installation procedure. no installation procedure.
@section{Functions from image.rkt and universe.rkt} @section{Functions from @racketmodname[2htdp/image] and @racketmodname[2htdp/universe]}
This package includes all of This package includes all of
@racketmodlink[2htdp/image]{the image teachpack} and @racketmodlink[2htdp/image]{the image teachpack} and
@ -58,6 +61,8 @@ This package also provides the following additional functions:
@; @include-section{image.rkt} @; @include-section{image.rkt}
@section{New image functions} @section{New image functions}
@defmodule*/no-declare[(picturing-programs/tiles)]
@declare-exporting[picturing-programs/tiles picturing-programs]
@defproc[(rotate-cw [img image?]) @defproc[(rotate-cw [img image?])
image?]{Rotates an image 90 degrees clockwise.} image?]{Rotates an image 90 degrees clockwise.}
@ -80,9 +85,6 @@ This package also provides the following additional functions:
@defproc[(crop-right [img image?] [pixels natural-number/c]) @defproc[(crop-right [img image?] [pixels natural-number/c])
image?]{Chops off the specified number of pixels from the right side of the image.} image?]{Chops off the specified number of pixels from the right side of the image.}
@defproc[(show-it [img image?])
image?]{Returns the given image unaltered. Useful as a draw handler for animations whose model is an image.}
@defproc[(reflect-vert [img image?]) @defproc[(reflect-vert [img image?])
image?]{The same as @racket[flip-vertical]; retained for compatibility.} image?]{The same as @racket[flip-vertical]; retained for compatibility.}
@ -90,6 +92,10 @@ This package also provides the following additional functions:
image?]{The same as @racket[flip-horizontal]; retained for compatibility.} image?]{The same as @racket[flip-horizontal]; retained for compatibility.}
@section{Variables} @section{Variables}
@defmodule*/no-declare[(picturing-programs/book-pictures)]
@declare-exporting[picturing-programs/book-pictures picturing-programs]
This teachpack also defines variable names for some of the pictures used in the textbook. This teachpack also defines variable names for some of the pictures used in the textbook.
@defthing[pic:bloch image?]{A picture of the author, c. 2005.} @defthing[pic:bloch image?]{A picture of the author, c. 2005.}
@ -110,6 +116,11 @@ distinguish them from anything you might define that happens to be named
particular, there's no requirement that your names start with "pic:". particular, there's no requirement that your names start with "pic:".
@section{Pixel functions} @section{Pixel functions}
@defmodule*/no-declare[(picturing-programs/map-image)]
@declare-exporting[picturing-programs/map-image picturing-programs]
The above functions allow you to operate on a picture as a whole, but sometimes The above functions allow you to operate on a picture as a whole, but sometimes
you want to manipulate a picture pixel-by-pixel. you want to manipulate a picture pixel-by-pixel.
@ -157,6 +168,7 @@ Gets the color of a specified pixel in the given image. If x and/or y are outsi
the bounds of the image, returns a transparent color.} the bounds of the image, returns a transparent color.}
@subsection{Specifying the color of each pixel of an image} @subsection{Specifying the color of each pixel of an image}
@defproc[(build-image [width natural-number/c] @defproc[(build-image [width natural-number/c]
[height natural-number/c] [height natural-number/c]
[f (-> natural-number/c natural-number/c color?)]) [f (-> natural-number/c natural-number/c color?)])
@ -315,6 +327,11 @@ The version using @racket[good-gradient] works.}
@section{Input and Output} @section{Input and Output}
@defmodule*/no-declare[(picturing-programs/io-stuff)]
@declare-exporting[picturing-programs/io-stuff picturing-programs]
This teachpack also provides several functions to help in testing This teachpack also provides several functions to help in testing
I/O functions (in Advanced Student language; ignore this section if I/O functions (in Advanced Student language; ignore this section if
you're in a Beginner or Intermediate language): you're in a Beginner or Intermediate language):