qb45advr.hlp (Topic list)
VIEW (Graphics) Statement Programming Examples
  QuickSCREEN      Details     Example      Contents      Index
──────────────────────────────────────────────────────────────────────────────
VIEW (Graphics) Statement Programming Examples
 
You may use multiple VIEW statements. If the newly described viewport
is not wholly within the previous viewport, the screen can be
re-initialized with the VIEW statement and the new viewport can be
defined. If the new viewport is entirely within the previous one, as
in the following example, the intermediate VIEW statement is not
necessary. This example opens three viewports, each smaller than the
previous one. In each case, the points of the line that lie outside
the viewport borders are clipped and do not appear on the screen.
 
SCREEN 1
CLS
VIEW    'Make the viewport cover most of the screen.
VIEW (10,10) - (300,180),,1
   CLS
   LINE (0,0) - (310,190),1
   LOCATE 1,11: PRINT "A big viewport"
VIEW SCREEN (50,50)-(250,150),,1
   CLS  'Note CLS clears only viewport.
   LINE (300,0)-(0,199),1
   LOCATE 9,9: PRINT "A medium viewport"
VIEW SCREEN (80,80)-(200,125),,1
   CLS
   CIRCLE (150,100),20,1
   LOCATE 11,9: PRINT "A small viewport"