It is currently Thu Jun 22, 2017 1:30 pm



Welcome
Welcome to rfobasic

You are currently viewing our boards as a guest, which gives you limited access to view most discussions and access our other features. By joining our free community, you will have access to post topics, communicate privately with other members (PM), respond to polls, upload content, and access many other special features. In addition, registered members also see less advertisements. Registration is fast, simple, and absolutely free, so please, join our community today. **You are not required to provide truthful information to any registration questions. Be whomever you wish to be.!


Post new topic Reply to topic  [ 3 posts ] 
Author Message
 Post subject: RFO and background pictures ?
Unread postPosted: Tue Apr 18, 2017 1:42 am 
Offline

Joined: Fri Jan 06, 2017 12:44 am
Posts: 11
Hi !

is it possible to put a image to background ? i dont want to say "draw a picture" but add a picture as background with automatically resize the X and Y coor.
Because when i put a 300*300 picture on a 600*1200 screen, it move to the right, and when i put it into biger resolution, it moove to the left .... so i cant have the correct position :(.
If we can put picture as background, it should automatically resize the picture to the screen dimensions

(sry for my english XD)


THX ALL


Report this post
Top
 Profile  
 
 Post subject: Re: RFO and background pictures ?
Unread postPosted: Tue Apr 18, 2017 8:09 am 
Offline
User avatar

Joined: Tue Jan 03, 2012 9:31 am
Posts: 5537
Location: Paris, France
Have you thought about HTML mode?
Have a look at these Google results for example.

Nicolas

_________________
- Creator of the Android BASIC! Compiler


Report this post
Top
 Profile  
 
 Post subject: Re: RFO and background pictures ?
Unread postPosted: Tue Apr 18, 2017 10:44 am 
Offline
User avatar

Joined: Mon Aug 18, 2014 1:16 pm
Posts: 1337
Hi Atomose

I took the code below from one of my apps. It may give you an idea of how to display a background image. It load the bitmap 'snowScene.png' scale it to the size of the screen and display it.

Regards Roy
xmas-match-t4747.html
Code:
Rem Display a background images.

di_height = 672 % set to your Device
di_width = 1152 % set to your Device

gr.open 255,0, 0, 128
gr.orientation 0 % Landscape 
pause 1000
WakeLock 3

gr.screen screenWidth, screenHeight

scale_x = screenWidth / di_width
scale_y = screenHeight / di_height
gr.scale scale_x, scale_y

path$ = "XmasMatch/data/"
! load and display background snow scene

gr.bitmap.load snowScene, path$ + "snowScene.png"
if snowScene = - 1 then ? "Image Load Error (snowScene.png)" : end
gr.bitmap.scale snowScene, snowScene, di_width, di_height
gr.bitmap.draw snowScene, snowScene, 0, 0
gr.render

do : pause 1 : until 0


Report this post
Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 3 posts ] 


Who is online

Users browsing this forum: No registered users and 1 guest


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
suspicion-preferred