- George Harrison
Pen
Pen Methods
Pen Constants
Constant Data Item | Data Type | Value |
Pen.Solid | int | 0 |
Pen.Dash | int | 1 |
Pen.Dot | int | 2 |
Pen.DashDot | int | 3 |
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<bool> IsValid()
Parameters
None
Return Value
Returns true if the pen object is valid
Description
This method returns true if the pen is valid (based on the specified color, width, etc.).
Pen Class
public method<Display> Display()
Parameters
None
Return Value
Returns reference to Display object
Description
This method returns the reference to the Display object where the Pen was created (the Display that was passed into the constructor). If a null was passed into the constructor, the local display is used, and this method returns the reference to the local Display object.
A Pen resource is created within the context of a Display, and it can only be used with that Display. If a Pen is used with a Display where it was not created, a DisplayException will be fired.
Pen Class