13.07.2015 Views

Turbo Basic

Turbo Basic

Turbo Basic

SHOW MORE
SHOW LESS
  • No tags were found...

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

VIEW statementFunctionSyntaxRemarksVIEW defines the active area (viewport) of the graphics screen.VIEW [ [SCREEN] [(xl,yl) - (x2, y2) [, [co7or [boundary]]]] ](xl, yl) and (x2, y2) are the upper left-hand and lower right-handcomers, respectively, of the viewport being defined. color is anoptional numeric argument; if included, the new viewport is filledwith this color. boundary is an optional numeric argument, whichwhen included causes <strong>Turbo</strong> <strong>Basic</strong> to draw a border around the newviewport in the specified color. If omitted, no border is drawn.VIEW defines an area on the graphics screen that can be writtento or, conversely, an area that may not be written to. Attempts to setpixels outside of the viewport fail; this is called clipping.SCREEN OptionIf the SCREEN keyword is omitted, future .point references are. taken relative to the top left corner of the viewport, rather than thetop left corner of the screen. For example, afterVIEW (100,50) - (300,180)thenPSET (0,0)turns on the pixel at (100,50).If SCREEN is included, points are specified in the normal way;that is, relative to the upper left-hand comer of the display. Forexample,PSET(O,O) refers to the pixel in the extreme upper lefthandcomer of the display. However, only those points that fallwithin the specified viewport are visible (pOints outside the viewportare clipped).VIEW with no arguments defines the entire screen as the viewport.Usingthe SCREEN statement to change screen modes (forexample, to go from medium resolution to high resolution), cancelsany VIEW setting that may have existed previously.When a viewport has been defined, CLS clears only the viewport.<strong>Turbo</strong> <strong>Basic</strong> Reference Directory 371

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!