DiGrande.it
Braille and Technologies for Visual Impairment

ColorPen- Sets the pen color

Sets the color of the pen with which figures or text are drawn.

- ColorPen(C)

- ColorPen(R,G,B)

Parameters:

- (int) C: Numerical or constant value containing the RGB color;

- (int) R: Red component of the RGB color (0 to 255);

- (int) G: Green component of the RGB color (0 to 255);

- (int) B: Blue component of RGB color (0 to 255).

Description:

Use ColorPen to change the pen color. The pen is the drawing tool that draws the lines of figures or writes the text in the graph.

The ColorPen instruction has two sets of parameters. You can use it by specifying the unique parameter that indicates the color, or you can specify the RGB components separately. In the first case, it is possible to use some constants.

See also the ColorPen constant that contains the pen color.

Examples:

- Draw some concentric circles of different color

ColorPen(ClGreen)

Circle(50,50,40)

ColorPen(ClBlue)

Circle(50,50,35)

ColorPen(ClRed)

Circle(50,50,30)