superclass: object% |
A pen-list% object maintains a list of pen% objects to avoid repeatedly creating pen objects. A pen% object in a pen list cannot be mutated.
A global pen list the-pen-list is created automatically.
(make-object pen-list%) → (is-a?/c pen-list%) |
Creates an empty pen list.
| |||||||||||||||||||||
width : (real-in 0 255) | |||||||||||||||||||||
| |||||||||||||||||||||
| |||||||||||||||||||||
color-name : string? | |||||||||||||||||||||
width : (real-in 0 255) | |||||||||||||||||||||
|
Finds a pen of the given specification, or creates one and adds it to the list. The arguments are the same as for creating a pen% instance. When color-name is provided, however, the return value is #f when no color matching color-name can be found in the-color-database.