포럼: Forum of Decimal BASIC (Thread #39901)

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

Reply to #81835×

You can not use Wiki syntax
You are not logged in. To discriminate your posts from the rest, you need to pick a nickname. (The uniqueness of nickname is not reserved. It is possible that someone else could use the exactly same nickname. If you want assurance of your identity, you are recommended to login before posting.) Login

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

Reply to #81835

Reply to #81837×

You can not use Wiki syntax
You are not logged in. To discriminate your posts from the rest, you need to pick a nickname. (The uniqueness of nickname is not reserved. It is possible that someone else could use the exactly same nickname. If you want assurance of your identity, you are recommended to login before posting.) Login

Re: SET BITMAP Problem (2018-09-02 21:28 by SHIRAISHI Kazuo #81838)

Decimal BASIC Ver.7.8 has Metafile graphics.
Try the above codes on Metafile graphics.
Reply to #81837

Reply to #81838×

You can not use Wiki syntax
You are not logged in. To discriminate your posts from the rest, you need to pick a nickname. (The uniqueness of nickname is not reserved. It is possible that someone else could use the exactly same nickname. If you want assurance of your identity, you are recommended to login before posting.) Login