SET BITMAP Problem (2018-09-02 19:28 by toml12953 #81835)
I'm trying to use only standard BASIC commands so I substituted the code in the help file for the SET BITMAP SIZE command.
The help file code gives an error at both the 0.1 parts. Should the period be a comma?
Even if I change the periods to commas, the code doesn't set the bitmap size.
IF width=height THEN
SET DEVICE WINDOW 0,1,0,(height-1)/(width-1)
SET VIEWPORT 0,1,0,(height-1)/(width-1)
ELSE
SET DEVICE WINDOW 0,(width-1)/(height-1),0.1 ! Error: expected ,
SET VIEWPORT 0,(width-1)/(height-1),0.1 ! Error: expected ,
END IF
SET WINDOW 0,1,0,1
Re: SET BITMAP Problem (2018-09-02 21:02 by SHIRAISHI Kazuo #81837)
Full BASIC commands cannot resize the physical window.
The command which rearranges the potential graphics window size is SET DEVICE VIEWPORT.
SET BITMAP SIZE acts beyond it.
The following codes show how to port SET BITMAP SIZE to another Full BASIC system.
100 LET width=0.08 ! in meters
110 LET height=0.06 ! in meters
120 SET DEVICE VIEWPORT 0,width,0,height
130 IF width>=height THEN
140 SET DEVICE WINDOW 0,1,0,height/width
150 SET VIEWPORT 0,1,0,height/width
160 ELSE
170 SET DEVICE WINDOW 0,width/height ,0,1
180 SET VIEWPORT 0,width/height,0,1
190 END IF
200 SET WINDOW 0,1,0,1
210 FOR x=0 TO 1 STEP 0.01
220 PLOT POINTS:x,2*x
230 NEXT x
240 END