FutureBasic Logo

<<    Index    >> FutureBasic

pen   statement



Syntax
pen [ width [ , color [ , capStyle [ , dashPattern [ , dashPhase [ , shadow ]]]]]]

Requires
macOS 10.11+

Description
The pen statement sets styles of lines and the frame styles of ovals and rectangles that are subsequently drawn in the current output window. The shadow attribute is also applied to printed text.

A pen statement with no parameters resets line styles to their default values. It also resets oval and rect fill color and rect corner radius to default values.

Parameters
Parameter
Description
width The line width. A negative value cancels line drawing. Default = 1.0.
color The line color as a ColorRef or one of FB's built-in constants, e.g.
_zYellow
_zGreen
_zCyan
_zBlue
_zMagenta
_zRed
_zBlack
_zWhite

See the CocoaUI.incl header for a complete list.
capStyle The line cap style. Options are:
NSLineCapStyleButt (default)
NSLineCapStyleRound
NSLineCapStyleSquare
dashPattern A CFArray of CFNumbers (floats). Default = NULL.
dashPhase The offset at which to start drawing the pattern. Default = 0.0.
shadow A ShadowRef. The shadow is applied to subsequent graphics and text drawn/printed to the window.
- no parameters - Reset all graphics attributes to their default values.
 
See also
cls; line; oval; rect