Viewport And Window - Sanyo MBC-550 Series User Manual

Table of Contents

Advertisement

Viewport and Window
The WINDOW instruction specifies which portion of the
world coordinate system (this portion is called a
window) should be taken. The VIEW instruction specifies
which portion of the screen coordinate system (screen)
should be used (this portion is called a viewport). The
VIEW is the definition of the drawing area.
The window and viewport combination enables outputting
either part or all of the graphics belonging to the
world coordinate system in various sizes and in various
ratios on the screen.
The window is the area of the world coordinates that
will be seen on an area of the screen defined by the
VIEW instruction.
Example
>10 CLS
>20 WINDOW(0,0)-(599»199)
>30 VIEW(0,0)-(599,199),6,4
>40 GOSUB 110
>50 VIEW(0,0)-(399,133),5,1
>60 GOSUB 110
>70 VIEW(0,0)-(199,67)»2,7
>80 GOSUB 110
>90 GOTO 90
>100 END
>110 CIRCLE(400,100),125
>120 LINE(275,35)-(525,165),4,B
>130 RETURN
,3
> i
As the VIEW instruction only decides the screen size
and does not affect the screen portions outside the
3-105

Hide quick links:

Advertisement

Table of Contents
loading

Table of Contents