6.1 add-color<%>

► |  | The Racket Graphical Interface Toolkit

1 | Windowing
2 | Widget Gallery
3 | Windowing Classes
4 | Windowing Functions
5 | Editors
6 | Snip and Style Classes
7 | Editor Classes
8 | Editor Functions
9 | WXME Decoding
10 | Preferences
11 | Dynamic Loading
12 | Startup Actions
13 | Init Libraries
14 | Platform Dependencies
| Index

▼ | 6 | Snip and Style Classes

6.1 | add-color<%>
6.2 | image-snip%
6.3 | mult-color<%>
6.4 | readable-snip<%>
6.5 | snip%
6.6 | snip-admin%
6.7 | snip-class%
6.8 | snip-class-list<%>
6.9 | string-snip%
6.10 | style<%>
6.11 | style-delta%
6.12 | style-list%
6.13 | tab-snip%

On this page:

get
get-a
get-b
get-g
get-r
set
set-a
set-b
set-g
set-r

top contents ← prev up next →

interface add-color<%> : interface?

An add-color<%> object is used to additively change the RGB values of a color% object. An add-color<%> object only exists within a style-delta% object.

See also get-foreground-add and get-background-add.

> method (send an-add-color get r g b [a]) → void?
> r : (box/c (integer-in -1000 1000))
> g : (box/c (integer-in -1000 1000))
> b : (box/c (integer-in -1000 1000))
> a : (or/c (box/c real?) #f) = #f

Gets all of the additive values.

The r box is filled with the additive value for the red component of the color. The g box is filled with the additive value for the green component of the color. The b box is filled with the additive value for the blue component of the color. The a box is filled with the additive value for the alpha component of the color, unless a is #f.

Changed in version 1.63 of package snip-lib: Added the a optional argument.

> method (send an-add-color get-a) → real?

Gets the additive value for the alpha component of the color.

Added in version 1.63 of package snip-lib.

> method (send an-add-color get-b) → (integer-in -1000 1000)

Gets the additive value for the blue component of the color.

> method (send an-add-color get-g) → (integer-in -1000 1000)

Gets the additive value for the green component of the color.

> method (send an-add-color get-r) → (integer-in -1000 1000)

Gets the additive value for the red component of the color.

> method (send an-add-color set r g b [a]) → void?
> r : (integer-in -1000 1000)
> g : (integer-in -1000 1000)
> b : (integer-in -1000 1000)
> a : real? = 0.0

Sets all of the additive values.

Changed in version 1.63 of package snip-lib: Added the a optional argument.

> method (send an-add-color set-a v) → void?
> v : real?

Sets the additive value for the alpha component of the color.

Added in version 1.63 of package snip-lib.

> method (send an-add-color set-b v) → void?
> v : (integer-in -1000 1000)

Sets the additive value for the blue component of the color.

> method (send an-add-color set-g v) → void?
> v : (integer-in -1000 1000)

Sets the additive value for the green component of the color.

> method (send an-add-color set-r v) → void?
> v : (integer-in -1000 1000)

Sets the additive value for the red component of the color.
top contents ← prev up next →