(LOGO.JPG) Python for OpenVMS

(go to: table of contents, index, list of vms_smg, prev: PREV, next: DRAW_LINE)


DRAW_CHAR - Draw a Character in a Virtual Display

Format:
    vms_smg.draw_char (display_id, flags, \
                       [row], [column],   \
                       [rendition_set], [rendition_complement])
Returns:

None

Arguments:

display_id
Virtual Display on which to draw the character.
flags
Bit mask indicating the character to be drawn. Values like SMG_M_UP are in module 'vms_smgdef'.
row
Row number at which to draw the character. If omitted, the position of the current virtual cursor is used.
column
Column number at which to draw the character. If omitted, the position of the current virtual cursor is used.
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
>>> # -- upper left corner
>>> vms_smg.draw_char (vtdpy1, vms_smgdef.SMG_M_DOWN,  1, 1)
>>> vms_smg.draw_char (vtdpy1, vms_smgdef.SMG_M_DOWN,  2, 2)
>>> vms_smg.draw_char (vtdpy1, vms_smgdef.SMG_M_RIGHT, 2, 2)
>>>
>>> # -- horizontal line
>>> vms_smg.draw_char (vtdpy1, vms_smgdef.SMG_M_RIGHT, 2, 3)
>>>
>>> # upper right corner
>>> vms_smg.draw_char (vtdpy1, vms_smgdef.SMG_M_DOWN, 2, 4)
>>> vms_smg.draw_char (vtdpy1, vms_smgdef.SMG_M_LEFT, 2, 4)
>>>
>>> # left vertical line
>>> vms_smg.draw_char (vtdpy1, vms_smgdef.SMG_M_UP, 3, 2)
>>>
>>> # right vertical line
>>> vms_smg.draw_char (vtdpy1, vms_smgdef.SMG_M_UP, 3, 4)
>>>
>>> # diamond
>>> vms_smg.draw_char (vtdpy1, 0, 3, 3)
>>>

Screen layout, file: VMS_SMG_018.JPG

(picture VMS_SMG_018.JPG)


(go to: table of contents, index, list of vms_smg, prev: PREV, next: DRAW_LINE)

10-SEP-2000 ZE.