Home
JAQForum Ver 24.01
Log In or Join  
Active Topics
Local Time 10:39 28 Nov 2024 Privacy Policy
Jump to

Notice. New forum software under development. It's going to miss a few functions and look a bit ugly for a while, but I'm working on it full time now as the old forum was too unstable. Couple days, all good. If you notice any issues, please contact me.

Forum Index : Microcontroller and PC projects : graphics off screen ok?

Author Message
stanleyella

Guru

Joined: 25/06/2022
Location: United Kingdom
Posts: 2129
Posted: 09:53pm 24 Jun 2023
Copy link to clipboard 
Print this post

Hi, using lcd graphics can go off screen and no error. please see example. This could be useful but is it safe to use? Where does the box go off screen?
'320x480 lcd
dim bx,by,bxl,byl
bx=50:by=50
cls
box bx,by,24,24,1,rgb(white)
do
bxl=bx
bx=bx-1
if bx=-24 then bx=479 'can be if bx=-240? change to bx=319 for 320x240
box bxl,by,24,24,1,rgb(black)
box bx,by,24,24,1,rgb(white)
pause 10
loop
the box doesn't wrap around, it collapses one side then expands the other side if you increase the pause to 100 you see it.
Edited 2023-06-25 08:01 by stanleyella
 
phil99

Guru

Joined: 11/02/2018
Location: Australia
Posts: 2137
Posted: 10:33pm 24 Jun 2023
Copy link to clipboard 
Print this post

  Quote  This could be useful but is it safe to use? Where does the box go off screen?
In the beginning going off screen could cause problems, but I think Peter changed it so that plotting pixels beyond the borders can't happen. As there is no buffer beyond the border they just vanish without error, so as far as I can tell it is safe to do.

As noted in the other thread graphic objects are not sprites, they are not stored anywhere. They are calculated and drawn from scratch each time you invoke them.
 
Print this page


To reply to this topic, you need to log in.

© JAQ Software 2024