
Pen
Pen Methods
| Pen() | Constructor for the Pen class using Color, Style and Width |
| Pen() | Constructor for the Pen class using another Pen object |
| Color() | Returns the Color object embedded in the Pen object |
| LineStyle() | Returns the line style for the Pen object (e.g. Solid) |
| LineWidth() | Returns the width of the line for the Pen object (in pixels) |
Pen Constants
| Constant Data Item | Data Type | Value |
| Pen.Solid | int | 1 |
| Pen.Dash | int | 2 |
| Pen.Dot | int | 3 |
| Pen.DashDot | int | 4 |
Derived Classes
None
See Also
Class Hierarchy, Window, Canvas, Color
public method Pen(Color ColorRef, int LineStyle = Pen.Solid, int LineWidth = 1)
Parameters
Color
Color object to be used by the pen when drawing
LineStyle
Style for the line
LineWidth
Width of the line Blue component of the color (0-255)
Return Value
None
Description
Constructor for the Pen class. All line drawing using this pen will use the associated Color, line style and line width. The line style is one of the constants provided in this class (Solid, Dash, Dot or DashDot). The line width is specified in pixels. The Pen object is associated with the same Display that the Color object is associated with, and can only be used with that Display.
Pen Class
public method Pen(Pen PenRef)
Parameters
PenRef
Pen object to be copied for this new pen
Return Value
None
Description
Constructor for the Pen class. The new pen uses the same color, line style and line width as the incoming Pen object.
Pen Class
public method<Color> Color()
Parameters
None
Return Value
Color of the Pen
Description
This method returns the Color object associated with this Pen object.
Pen Class
public method<int> LineStyle()
Parameters
None
Return Value
Line style of the Pen
Description
This method returns the line style for the Pen object (Solid, Dash, Dot or DashDot).
Pen Class
public method<int> LineWidth()
Parameters
None
Return Value
Line width of the Pen
Description
This method returns the line width (in pixels) for the Pen object.
Pen Class