In addition to its color, width, and style, a pen can have a stipple bitmap. Painting with a stipple pen is similar to calling draw-bitmap with the stipple bitmap in region painted by the pen.
A pen’s style is one of the following:
'transparent —
Draws with no effect (on the outline of the drawn shape). 'solid —
Draws using the pen’s color. If a (monochrome) stipple is installed into the pen, black pixels from the stipple are transferred to the destination using the brush’s color, and white pixels from the stipple are not transferred. 'xor —
The same as 'solid, accepted only for partial backward compatibility. - The following special pen modes use the pen’s color, and they only apply when a stipple is not used:
To avoid creating multiple pens with the same characteristics, use the global pen-list% object the-pen-list, or provide a color, width, and style to set-pen in dc<%>.
A pen of size 0 uses the minimum line size for the destination drawing context. In (unscaled) canvases and bitmaps, a zero-width pen behaves the nearly same as a pen of size 1.
| ||||||||||||||||||||||||||||||||||||||||||
color : (or/c string? (is-a?/c color%)) = "black" | ||||||||||||||||||||||||||||||||||||||||||
width : (real-in 0 255) = 0 | ||||||||||||||||||||||||||||||||||||||||||
| ||||||||||||||||||||||||||||||||||||||||||
cap : (one-of/c 'round 'projecting 'butt) = 'round | ||||||||||||||||||||||||||||||||||||||||||
join : (one-of/c 'round 'bevel 'miter) = 'round | ||||||||||||||||||||||||||||||||||||||||||
stipple : (or/c #f (is-a?/c bitmap%)) = #f |
(send a-pen get-stipple) → (or/c (is-a?/c bitmap%) #f) |
(send a-pen get-style) | ||||||||
|
A pen cannot be modified if it was obtained from a pen-list% or while it is selected into a drawing context.
(send a-pen set-color color) → void? |
color : (is-a?/c color%) |
(send a-pen set-color color-name) → void? |
color-name : string? |
(send a-pen set-color red green blue) → void? |
red : (integer-in 0 255) |
green : (integer-in 0 255) |
blue : (integer-in 0 255) |
A pen cannot be modified if it was obtained from a pen-list% or while it is selected into a drawing context.
A pen cannot be modified if it was obtained from a pen-list% or while it is selected into a drawing context.
If bitmap is modified while is associated with a pen, the effect on the pen is unspecified. A pen cannot be modified if it was obtained from a pen-list% or while it is selected into a drawing context.
(send a-pen set-style style) → void? | ||||||||||
|
A pen cannot be modified if it was obtained from a pen-list% or while it is selected into a drawing context.