(LOGO.JPG) Python for OpenVMS

(go to: table of contents, index, list of vms_smg, prev: DRAW_CHAR, next: DRAW_RECTANGLE)


DRAW_LINE - Draw a horizontal or vertical line

Format:
    vms_smg.draw_line (display_id, start_row, start_column, \
                       end_row, end_column,                 \
                       [rendition_set], [rendition_complement])
Returns:

None

Arguments:

display_id
Virtual Display on which to draw the line.
start_row
Row number at which to begin drawing the line.
start_column
Column number at which to begin drawing the line.
end_row
Row number at which the line ends.
end_column
Column number at which the line ends.
rendition_set
Attribute specifier. Bit mask values like SMG_M_BOLD are in module 'vms_smgdef'.
rendition_complement
Attribute complement specifier. There are no symbolic names available - please see the OpenVMS documentation for details.
Examples:
>>> import vms_smg
>>> import vms_smgdef

>>> # create a new DECwindows terminal using SMG
>>> status, pasteboard_id, number_of_pasteboard_rows, \
... number_of_pasteboard_columns, type_of_terminal,   \
... device_name = vms_smg.create_pasteboard           \
...   (None, vms_smgdef.SMG_M_WORKSTATION)
>>>

>>> # create virtual display
>>> status, vtdpy1 = vms_smg.create_virtual_display \
...         (5, 10, vms_smgdef.SMG_M_BORDER, None, None)
>>>

>>> # paste virtual display
>>> status = vms_smg.paste_virtual_display \
...          (vtdpy1, pasteboard_id, 3, 5, None)
>>>

>>> # draw on virtual display
>>> vms_smg.draw_line (vtdpy1, 2, 2, 2, 7)
>>> vms_smg.draw_line (vtdpy1, 4, 2, 4, 8)
>>> vms_smg.draw_line (vtdpy1, 3, 4, 5, 4)
>>> vms_smg.draw_line (vtdpy1, 4, 6, 5, 6)
>>>

Screen layout, file: VMS_SMG_019.JPG

(picture VMS_SMG_019.JPG)

>>> # diagonal lines are not allowed
>>> vms_smg.draw_line (vtdpy1, 4, 6, 5, 7)
Traceback (innermost last):
  File "<stdin>", line 1, in ?
vms_smg.error: (1213084, '%SMG-F-DIALINNOT, diagonal line not allowed')
>>>

(go to: table of contents, index, list of vms_smg, prev: DRAW_CHAR, next: DRAW_RECTANGLE)

10-SEP-2000 ZE.