*DISPLAY "BRW.bmp" 200,1100,100,100
works fine but
SIDE=100
*DISPLAY "BRW.bmp" 200,1100,SIDE,SIDE
does not, and neither does
ANY$="BRW.bmp"
*DISPLAY ANY$ 200,1100,100,100
Is there a better way to display a bmp at a particular location?
Does *DISPLAY accept variables?
-
- Posts: 64
- Joined: Tue 03 Apr 2018, 12:07
- Location: Belgium
Re: Does *DISPLAY accept variables?
If you want to use a *command (*DISPLAY) with variable(s) then you should resort to OSCLI
In your case replace
by
Maybe I could get rid of a few """ 's, but I just took the example from the help section (search for OSCLI) and filled in your bits and pieces (with a bmp file that I found somewhere on my HD).
It works fine. Hope this helps.
Edja
In your case replace
Code: Select all
ANY$="BRW.bmp"
*DISPLAY ANY$ 200,1100,100,100
Code: Select all
ANY$="BRW.bmp"
OSCLI "DISPLAY """+ANY$+""" "+"200,1100,100,100"
It works fine. Hope this helps.
Edja
-
- Posts: 2
- Joined: Mon 27 May 2019, 02:28
Re: Does *DISPLAY accept variables?
Yes, your suggestion works. I had seen mention of OSCLI, but didn't grasp that it would work this simply:
bmpfile$ = "mypicture.bmp"
x=111
y=222
w=100
h=100
and that the following line, exactly as shown, does display mypicture.bmp at position x,y and scaled to the width and height specified
OSCLI "DISPLAY """+bmpfile$+""" "+STR$x+","+STR$y+","+STR$w+","+"STR$h
Much obliged!
bmpfile$ = "mypicture.bmp"
x=111
y=222
w=100
h=100
and that the following line, exactly as shown, does display mypicture.bmp at position x,y and scaled to the width and height specified
OSCLI "DISPLAY """+bmpfile$+""" "+STR$x+","+STR$y+","+STR$w+","+"STR$h
Much obliged!