Setting color, line width, and style

You can use the Pen(Mode, Value) method to set the color, line width, and style of your drawings.

Setting a color

Use the following syntax to set the color:

Copy
Pen('Color','<ColorName>');

Where <ColorName> is the name of the color you want to use.

Example

Copy
Pen('Color','Blue');

Alternatively, you can use the PenColor method:

Copy
PenColor('Blue');

Setting line width

Use the following syntax to set the line width:

Copy
Pen('Width','<LineWidthValue>');

Where <LineWidthValue> is the thickness of the line.

Example

Copy
Pen('Width','3');

Alternatively, you can use the PenWidth method:

Copy
PenWidth('3')

Setting line style

Use the following syntax to set the line style: 

Copy
Pen('Style','<StyleValue>');

Where <StyleValue> can take one of the following values:

  • Solid. Specifies to use solid line.
  • Dash. Specifies to use dashes.
  • Dot. Specifies to use dots.
  • DashDot. Specifies to use alternating dashes and dots.
  • DashDotDot. Specifies to use a series of dash-dot-dot combinations.
  • Clear. Specifies that no line is used. Use this value to omit the line around shapes that draw an outline using the current pen.

Examples

Copy
Pen('Style','Dot');
Copy
Pen('Style','Solid');
Copy
Pen('Style','Clear');