APLX Help : System Classes : List of Classes : Line
|
|
![]() |
Line |
DescriptionThe Line object draws a single line, and is normally used for display purposes only. The where or size property is used to define the enclosing rectangle, with a special meaning. The first two parameters (top and left of the 'rectangle') are the starting position of the line. The second two (height and width of the 'rectangle') are the offset to the end of the line, and may be negative. For example, if where is You can set the drawing (foreground) color using the color property, and the pensize property changes the thickness of the lines. Note: Remember that the default scale is in character units. See the scale property for details. See also the Draw method which allows you to draw geometric shapes on your windows and controls. Example∇DEMO_Line;DEMO [1] ⍝ Sample function demonstrating use of the Line object [2] DEMO←'⎕' ⎕NEW 'Window' ⋄ DEMO.scale←1 [3] DEMO.title←'Line Example' [4] ⍝ [5] ⍝ Thin horizontal line in red [6] DEMO.LN1.New 'Line' [7] DEMO.LN1.where←4 0 0 10 [8] DEMO.LN1.color←255 [9] ⍝ [10] ⍝ Thicker diagonal line in blue [11] DEMO.LN2.New 'Line' [12] DEMO.LN2.where←4 10 8 10 [13] DEMO.LN2.pen←4 [14] DEMO.LN2.color←0 0 255 [15] ⍝ [16] ⍝ Wait for the user to close the window [17] 0 0⍴⎕WE DEMO ∇ Propertiesalign anchors aquaadjust autodraw children class color data dragsource droptarget enabled events extent filled maxsize methods minsize name opened pointer properties scale self size sourceformats targetformats tie units visible where MethodsClick Clienttoscreen Close Create Delete Hide New Open Paint Resize Screentoclient Send Set Show Trigger CallbacksonClick onClose onDblClick onDestroy onDragDrop onDragEnd onDragEnter onDragLeave onDragOver onDragStart onHide onMouseDown onMouseMove onMouseUp onOpen onSend onShow |
|
APLX Help : System Classes : List of Classes : Line
|
Copyright © 1996-2010 MicroAPL Ltd