BBC BASIC for Windows
« Scrolling (or sliding) pictures »

Welcome Guest. Please Login or Register.
Apr 6th, 2018, 12:24am



ATTENTION MEMBERS: Conforums will be closing it doors and discontinuing its service on April 15, 2018.
Ad-Free has been deactivated. Outstanding Ad-Free credits will be reimbursed to respective payment methods.

If you require a dump of the post on your message board, please come to the support board and request it.


Thank you Conforums members.

BBC BASIC for Windows Resources
Online BBC BASIC for Windows documentation
BBC BASIC for Windows Beginners' Tutorial
BBC BASIC Home Page
BBC BASIC on Rosetta Code
BBC BASIC discussion group
BBC BASIC for Windows Programmers' Reference

« Previous Topic | Next Topic »
Pages: 1  Notify Send Topic Print
 thread  Author  Topic: Scrolling (or sliding) pictures  (Read 564 times)
KenDown
Full Member
ImageImageImage


member is offline

Avatar




PM


Posts: 181
xx Re: Scrolling (or sliding) pictures
« Reply #5 on: May 5th, 2015, 06:41am »

Curious. To get the screen contents to move right, you have to *decrease* @ox% from zero to screen width.

However even more curious is the fact that any graphics have to be at least 4 in from the left, otherwise they leave a "smear" as they move to the right - and no matter how far in you put any text (under VDU4) they drag a line across behind it. The graphics I can cope with, but have you any ideas about the text line?
User IP Logged

KenDown
Full Member
ImageImageImage


member is offline

Avatar




PM


Posts: 181
xx Re: Scrolling (or sliding) pictures
« Reply #6 on: May 5th, 2015, 06:56am »

Hmmmm. An even more fundamental problem appears to be that altering the @ox% variable moves what is on the screen to left or right - but anything not on the screen does not appear. If I have a picture wider than the screen, the part which is plotted can be scrolled around, but the part which did not appear has gone.

Thus if my screen is 1280 wide and I plot a picture 2000 wide and then fiddle with @ox%, the left-most 1280 moves around beautifully, but the right-most 720 never appears.
User IP Logged

rtr2
Guest
xx Re: Scrolling (or sliding) pictures
« Reply #7 on: May 5th, 2015, 07:12am »

on May 5th, 2015, 06:41am, KenDown wrote:
However even more curious is the fact that any graphics have to be at least 4 in from the left, otherwise they leave a "smear" as they move to the right

You can't move anything to the right, because that leaves a 'border' in which there is nothing to be displayed! Try scrolling a text editor like Notepad to the right - starting at its 'home' position - you can't do it.

So you must never store a negative value into @ox% or @oy%. From your description you have misunderstood how they work - refresh your memory by once again running the supplied example program SCROLL.BBC.

Edit: For the avoidance of doubt I have now modified the online BB4W documentation to state explicitly that @ox% and @oy% "must be zero or positive":

http://www.bbcbasic.co.uk/bbcwin/manual/bbcwin2.html#systemvars

Richard.
« Last Edit: May 5th, 2015, 08:31am by rtr2 » User IP Logged

KenDown
Full Member
ImageImageImage


member is offline

Avatar




PM


Posts: 181
xx Re: Scrolling (or sliding) pictures
« Reply #8 on: May 5th, 2015, 07:56am »

Hmmm. Scrub my last comment. I was just using graphics (RECTANGLEFILL). However when I tried plotting a picture, the whole picture did appear, so sorry about that.

As for putting a negative value into @ox%, it doesn't appear to cause any problems apart from the "smearing" effect, which can be bodged.

Oh, and the line the followed text is, in fact, the cursor and is solved by incorporating OFF.
User IP Logged

rtr2
Guest
xx Re: Scrolling (or sliding) pictures
« Reply #9 on: May 5th, 2015, 08:45am »

on May 5th, 2015, 07:56am, KenDown wrote:
As for putting a negative value into @ox%, it doesn't appear to cause any problems apart from the "smearing" effect, which can be bodged.

It may not "appear" to, but I can assure you it does. I'm sorry, but you must never store a negative value into @ox% or @oy% (I have now amended the BB4W documentation to state this explicitly).

If you really want to see the sort of unwanted effects doing so can cause, try storing a negative value in @ox% and then minimise/restore the window!

No common application, whether text or graphics, allows you to scroll to the right from the 'home' position. Try it in Notepad or Paint (or even the BB4W editor): that's as far right as you can go. The @ox% and @oy% system variables are designed to support only this 'conventional' kind of scrolling.

Richard.
User IP Logged

Pages: 1  Notify Send Topic Print
« Previous Topic | Next Topic »

| |

This forum powered for FREE by Conforums ©
Terms of Service | Privacy Policy | Conforums Support | Parental Controls