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.
Creates an empty pen list.
|
color : (is-a?/c color%) |
width : (real-in 0 255) |
| style | | : | | (one-of/c 'transparent 'solid 'xor 'hilite | 'dot 'long-dash 'short-dash 'dot-dash | 'xor-dot 'xor-long-dash 'xor-short-dash | 'xor-dot-dash) |
|
|
cap : (one-of/c 'round 'projecting 'butt) = 'round |
join : (one-of/c 'round 'bevel 'miter) = 'round |
|
→ (or/c (is-a?/c pen%) false/c) |
color-name : string? |
width : (real-in 0 255) |
| style | | : | | (one-of/c 'transparent 'solid 'xor 'hilite | 'dot 'long-dash 'short-dash 'dot-dash | 'xor-dot 'xor-long-dash 'xor-short-dash | 'xor-dot-dash) |
|
|
cap : (one-of/c 'round 'projecting 'butt) = 'round |
join : (one-of/c 'round 'bevel 'miter) = 'round |
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 plus a cap and join style as for
set-cap and
set-join. When
color-name is provided, however, the return
value is
#f when no color matching
color-name can be
found in
the-color-database.