| Mnemonics |
|
| GUI Display/Printer | |||
| Formats | 1. Define Graphics Group: 'IMAGE' ("group$") 2. Delete Graphics Group: 'IMAGE'(DELETE group$) 3. Enable/Disable Group: 'IMAGE'({ENABLE | DISABLE} group$) 4. Hide/Show Group: 'IMAGE'({HIDE | SHOW} group$) Where: |
||
| group$ | Graphics group name. String expression. If you omit this when defining a group, the default is "" (null). | ||
| Description | ProvideX normally queues all mnemonics since the last ‘CS' (to supply information in case Windows needs to redraw the screen). In consequence, if you are constantly creating graphics, you can exhaust system resources. 'IMAGE' helps to circumvent this potential problem. When 'IMAGE' is used to define and control the display of graphics groups, all graphical mnemonics following the 'IMAGE' mnemonic will be grouped. You can then disable or hide the group to remove it from view and enable or show the group to make it visible. The DELETE option can be used to destroy the group and return resources to the system. |
||
| Hint: When drawing graphical objects, each object will be laid one on top of the next. Use the 'IMAGE' mnemonic to erase previous graphics instead —this reduces the consumption of Windows resources and helps prevent flicker during a repaint operation. | |||
| Example | 0010 ! Display 'image' groups 0020 PRINT 'CS' 0030 LET FACE$='PEN'(1,4,3)+'ARC'(800,200,105,1,1,360) 0040 LET NOSE$='PEN'(1,4,0)+'LINE'(800,205,800,235) 0050 LET LEFT_EYE$='PEN'(1,2,4)+'FILL'(1,0)+'CIRCLE'(765,170,20) 0060 LET RIGHT_EYE$='PEN'(1,1,0)+'FILL'(1,0)+'CIRCLE'(835,170,18,1) 0070 LET WINK$='PEN'(1,4,0)+'ARC'(765,170,20,1,165,15)+'FILL'(1,0)+'CIRCLE'(775 0070:,170,10) 0080 LET SMILE$='PEN'(1,3,0)+'ARC'(800,230,45,1,190,350) 0090 PRINT 'IMAGE'("HAPPY"),FACE$,NOSE$,SMILE$ 0100 PRINT 'IMAGE'("WIDE_EYED"),LEFT_EYE$+RIGHT_EYE$; WAIT .5 0110 PRINT 'IMAGE'(DISABLE "WIDE_EYED") 0120 PRINT 'IMAGE'("WINK"),WINK$,RIGHT_EYE$; WAIT 1; PRINT 'IMAGE'(DELETE "WINK") 0130 PRINT 'IMAGE'(ENABLE "WIDE_EYED"); WAIT 1 0140 PRINT 'IMAGE'(DELETE "HAPPY"),'IMAGE'(DELETE "WIDE_EYED") 0150 PRINT @(0,12); LIST 0160 PRINT WINK$,RIGHT_EYE$,NOSE$,SMILE$; END |
||