racket/draw: doc clarifications related to `color%'

Commit 18883681a2 reordered the methods. Although the convention in
the `racket/draw' manual is to order methods alphabetically,
alphabetical does look strange for `color%', and I've refined the
non-alphabetical order to one I like even more.
This commit is contained in:
Matthew Flatt 2012-08-03 14:22:58 -06:00
parent aba046a92d
commit f64408fe60
2 changed files with 18 additions and 12 deletions

View File

@ -21,22 +21,12 @@ object using a color name, and see also @racket[make-color].
([color-name string?]))]{
Creates a new color with the given RGB values and alpha, or matching
the given color name (using ``black'' if no color is given or if the
the given color name (using @racket["black"] if no color is given or if the
name is not recognized). See @racket[color-database<%>] for more
information on color names.
}
@defmethod[(copy-from [src (is-a?/c color%)]) (is-a?/c color%)]{
Copies the RGB values of another color object to this one, returning
this object as the result.}
@defmethod[(is-immutable?) boolean?]{
Returns @racket[#t] if the color object is immutable.}
@defmethod[(ok?) boolean?]{
Returns @racket[#t] if the color object is valid.}
@defmethod[(red) byte?]{
Returns the red component of the color.}
@ -54,4 +44,19 @@ Creates a new color with the given RGB values and alpha, or matching
void?]{
Sets the four (red, green, blue, and alpha) component values of the color.}
@defmethod[(copy-from [src (is-a?/c color%)]) (is-a?/c color%)]{
Copies the RGB values of another color object to this one, returning
this object as the result.}
@defmethod[(is-immutable?) boolean?]{
Returns @racket[#t] if the color object is immutable.
See also @racket[make-color] and @xmethod[color-database<%> find-color].}
@defmethod[(ok?) #t]{
Returns @racket[#t] to indicate that the color object is valid.
(Historically, the result could be @racket[#f], but color objects
are now always valid.)}
}

View File

@ -205,7 +205,8 @@ See also @racket[color%].
(or/c (is-a?/c color%) #f)]{
Finds a color by name (character case is ignored). If no color is
found for the name, @racket[#f] is returned.}
found for the name, @racket[#f] is returned, otherwise the result
is an immutable color object.}
@defmethod[(get-names) (listof string?)]{