5.2 Pen
A pen is typically installed to a drawing context’s DC.pen property.
class | |||||||||
|
A pen’s ink straddles the mathematical line or curve that it draws, so that it spans width/2 drawing units on each side. A width or 0 is treated as a minimal drawin unit for the destination, such as a single pixel for a bitmap destination.
A pen’s cap is used to shape each end of a line or curve, except in the case that multiple lines or curves are joined together. In the latter case, join points are shaped by cap.
A pen’s style determines how it draws along a line or curve. Drawing with a #'transparent pen is the same as not drawing.
If a pen has a stipple bitmap, some styles are ignored (see Pen.Style), and stipple it is used to fill pixels that otherwise would be covered by the pen’s ink. A monochrome stipple takes on color as it is drawn.
A pen like an existing one can be constructed using with and the field names color, width, style, cap, join, and/or stipple.
property | |
| |
property | |
| |
property | |
| |
property | |
| |
property | |
| |
property | |
property | |
| |
function | |