Date   

A minor query?

 

Richard, and all ..

I recently installed bbcsdl on my Linux Mint 19 desktop and it seems to be ok apart from a minor point ... Having opened the IDE, it initially is in a smallish window, if I click the maximise button the screen fills with the white window, but the actual ide area is only about one quarter of that. If I load a program before maximising, the ide area does then fill the screen. Is this considered normal for this version of your bbc basic?

 


Virus-free. www.avast.com


Re: Problem with SWAP on Android using BBCSDL

Richard Russell
 

On Mon, Feb 11, 2019 at 10:15 AM, alan836975 wrote:
And the thing I miss most about BBCSDL is not having any menu/dialog calls. That stops me dead.
What a strange thing to say.  Dialogue boxes are quite well supported in BBCSDL: there's a library ('dlglib.bbc') and an example program ('dlgdemo.bbc') which are supplied with all the desktop editions.  'SDLIDE.bbc', 'compiler,bbc', 'listvars.bbc' and 'profiler.bbc' all use dialogue boxes, or components thereof (e.g. list boxes) created using the supplied library.  The syntax is deliberately very similar to that used by the WINLIB2 library so porting existing code is usually straightforward (although there's no combobox, so you would need to fabricate it from a textbox and a listbox if you required one).

It's true that there is currently no library support for menus, but both 'SDLIDE.bbc' and 'BBCEdit.bbc' have drop-down menus so code can be borrowed from them or quite easily written from scratch (a menu is little more than a clickable text viewport).  If somebody would like to contribute a menu library, either written from scratch or containing code taken from, say, 'SDLIDE.bbc' I would be more than happy to consider including it (the latest release of BBCSDL contains a user-supplied TreeView control as you know). 

Anyway, when asking about features 'missing' from BBCSDL I am of course talking about BBC BASIC language features.  No version of BBC BASIC has ever had built-in support for menus or dialogue boxes, or indeed any kind of GUI.  If that's what you are after, consider a language like Liberty BASIC (or LB Booster) which does.


Re: Problem with SWAP on Android using BBCSDL

 

I tried using RECTANGLE SWAP in a little program I was writing, and it worked nicely, but I then dropped it in favour of scrolling the screen - much easier to understand for the user.

And the thing I miss most about BBCSDL is not having any menu/dialog calls. That stops me dead.

Alan Roberts

--
Alan Roberts - Mugswell, Surrey
+44 (0)1737832586
+44 (0)7749387934


Re: Problem with SWAP on Android using BBCSDL

Richard Russell
 

On Thu, Feb 7, 2019 at 01:56 PM, Richard Russell wrote:
No.  It's not a 'standard' BBC BASIC feature anyway: it's something I added in BB4W (because I could) but it's not present in any other version, including Acorn versions and BBCSDL.  I've never seen it used in a program so I didn't think it would be missed.
I was expecting (or at least hoping for) some reaction to this, for example in respect of what your use case is (were you experimenting with RECTANGLE SWAP out of curiosity or because you have a specific application?) or whether anybody else considers the absence of this feature from BBCSDL to be of concern.  I'm willing to bet that 90% of BB4W users have never been aware that it existed!

There are several other features of BB4W which have never made it into BBCSDL, either because of the difficulty involved or because I haven't been able to motivate myself to do so.  When I canvassed opinion on whether to bump the version number to 1.00 I drew attention to the fact that BBCSDL is 'incomplete' but that didn't seem to be of great concern, at least not sufficiently so to warrant delaying that move.

But I am still interested to know if there are features that people think should be added.


Re: Problem with ellipsefill on Android using BBCSDL 1.00a

Richard Russell
 

On Sat, Feb 9, 2019 at 08:37 PM, DaveinSpain wrote:
I have recorded the faulty one and am enclosing it - although only you, Richard, will be able to receive it, I believe.
I have explained before that I view the group using its web interface which does not support attachments.

Have you tried version 1.00c and if so what are your findings in respect of the questions I asked?


Re: Problem with ellipsefill on Android using BBCSDL 1.00a

DaveinSpain
 

Richard, I have been experimenting, with some very strange results!
I have two Android machines. One I can't make go wrong, the other always goes wrong - a Blackview with v7.0

I have modified "elipses.bbc" with:- a=GET : CLG after the A% = A%+1 increment.
I have modified "elipse.bbc" with variables for the eight "4,3" in the relevant places.
The same mod on both machines

I now have "stop motion"  and get different results on each.
I have recorded the faulty one and am enclosing it - although only you, Richard, will be able to receive it, I believe.

Regards, Dave N


Re: Problem with ellipsefill on Android using BBCSDL 1.00a

Richard Russell
 

I've uploaded BBCSDL v1.00c (Android only) to make it easier for people to do some more testing without needing to edit the ellipse library themselves.  In this version I've set the number of line segments per Bezier curve to six (twice the original number) and also done some more tidying up.  For example there is now error trapping to catch the possibility of it being interrupted whilst in an unstable state.

I'd like as many people with Android devices as possible to respond to the following questions:

1.  Is six line segments per Bezier working better than, worse than or no different from the original three?
2.  For those who experimented with four segments, is six segments better, worse or no different?
3.  Does it seem that increasing the number of line segments results in a general improvement, or does it simply alter the angles at which the flood-fill 'leaks'?

Unfortunately I cannot provoke it to fail on any of my Android devices (six in all) so I am reliant on these reports in order to make any progress.


Re: Problem with ellipsefill on Android using BBCSDL 1.00a

LifesVoyager
 

Sorry.  That should be  Android 5.0.2


Re: Problem with ellipsefill on Android using BBCSDL 1.00a

Richard Russell
 

On Fri, Feb 8, 2019 at 01:35 PM, DaveinSpain wrote:
I then tried changing the short axis in 'elipses.bbc' from 80 to 480, effectively  making it draw circles and the fault reappeared
Of course a circle has a greater circumference than the ellipse (and hence the straight-line segments comprising the Bezier curves are longer) so can I assume you tried increasing the number above 4?  I did say to try increasing it "from 3 to 4 (or more)" so to keep the segments short - if indeed that helps - implies increasing the number pro-rata with the circumference.


Re: Problem with ellipsefill on Android using BBCSDL 1.00a

LifesVoyager
 

Also

Running Android 8.0.2 on a different XiaoMi phone,  ellipses.BBC works perfectly


Re: Problem with ellipsefill on Android using BBCSDL 1.00a

Richard Russell
 

On Fri, Feb 8, 2019 at 12:49 PM, lettersquash wrote:
the angles change and ellipses still fail at particular angles.
That's what I would have expected.  It would still be interesting to know whether the 'gaps' through which the flood-fill is apparently leaking are at the junctions between the four Bezier curves, or between the straight-line segments comprising the Bezier curves.  The former would be amenable to a workaround of 'plugging the gaps' but the latter not.  The way I would probably make that determination would be to colour the four Bezier curves differently (that would involve changing the flood-fill to the more common 'fill while background' type rather than the 'fill until foreground' used by the ellipse library).


Re: Problem with ellipsefill on Android using BBCSDL 1.00a

DaveinSpain
 

It fails on my Android v7.0 phone too.
After the 4 to 3 mod it seemed to be okay.
I then tried changing the short axis in 'elipses.bbc' from 80 to 480, effectively  making it draw circles and the fault reappeared.
Tried making the line thicker but elipses only uses single pixel lines.
Dave N


Re: Problem with ellipsefill on Android using BBCSDL 1.00a

lettersquash <j.r.freestone@...>
 

As I said earlier, something else is quite different depending on the device or OS or something, because on my Galaxy Tab, each ellipse is erased before the next one is drawn (without any leaking, at least at those defaults - I haven't edited either file on that machine), whereas on my phone they are left, so the next one overlaps part of the pattern and a sort of elliptical spiral staircase emerges. I expect this is what the code is supposed to do, leave them, but I don't know what the second call, to PROCellipse, actually does. I'm guessing it just draws an outline round the already drawn ellipse. So on the Tab, perhaps that's not working either and is filling it in background colour or something. But the Tab is ancient.


Re: Problem with ellipsefill on Android using BBCSDL 1.00a

lettersquash <j.r.freestone@...>
 

Yeah, it hadn't quit. Killing the process and re-running BBC BASIC, as you say, reinstates the 3, but my tests were with a 4, and some angles still fail. Sorry to say.


Re: Problem with ellipsefill on Android using BBCSDL 1.00a

lettersquash <j.r.freestone@...>
 

OK, so I did close BBCSDL before trying different values of n% (number instead of 20 as above), and it failed on other numbers.

But being Android, perhaps it didn't quit, because when I just started it again and checked, the changes to ellipse.bbc in @lib% remain.

So if I understand right, that's bad news. With the "4 instead of 3" fix, if you try 12 instead of 20 (say) in ellipses.bbc, it fails again. 20 just happens to work out to avoid the error.


Re: Problem with ellipsefill on Android using BBCSDL 1.00a

lettersquash <j.r.freestone@...>
 

Oops, posts coming thick and fast, I didn't see this:
Please note that if you edit these lines 'in situ' the change will only last for the current session.  As soon as you restart BBCBasic it will revert to the standard library.  For any 'serious' testing I would copy both 'ellipse.bbc' (the library) and 'ellipses.bbc' (the demo program) into the @usr$ folder and edit the copied ellipses.bbc to load the library from @usr$ rather than @lib$.  That way you can make changes which will 'stick'.
So, you never know...


Re: Problem with ellipsefill on Android using BBCSDL 1.00a

lettersquash <j.r.freestone@...>
 

I changed all the relevant fifth params to 4. Unfortunately, this cures the issue only 'empirically'. If I choose a different number of ellipses (I made the "A%*PI/20" and "MOD20" to use a % variable instead of 20), the angles change and ellipses still fail at particular angles.


Re: Problem with ellipsefill on Android using BBCSDL 1.00a

gav
 

Thanks for the clarification. Copied to @usr$ and those changes fixed it on my phone.

Gavin



Sent from Samsung Mobile on O2

-------- Original message --------
From: Richard Russell <news@...>
Date: 08/02/2019 11:51 (GMT+00:00)
To: bb4w@groups.io
Subject: Re: [bb4w] Problem with ellipsefill on Android using BBCSDL 1.00a

On Fri, Feb 8, 2019 at 11:15 AM, gav wrote:
Can someone tell the exactly where to change the line segment value from 3 to 4 please so I can check if that helps.
There are eight  calls to bezierColor() in the PROCellipsefill section of the ellipse.bbc library:

      SYS "GFX_bezierColor",@memhdc%,v%%,   w%%,   4,3,Z%
      SYS "GFX_bezierColor",@memhdc%,v%%+6, w%%+6, 4,3,Z%
      SYS "GFX_bezierColor",@memhdc%,v%%+12,w%%+12,4,3,Z%
      SYS "GFX_bezierColor",@memhdc%,v%%+18,w%%+18,4,3,Z%
      SWAP Z%,@hpal%!(@vdu%?67*4)
      SWAP @vdu%?65,@vdu%?67
      PLOT 143,X%,Y%
      SYS "GFX_bezierColor",@memhdc%,v%%,   w%%,   4,3,Z%
      SYS "GFX_bezierColor",@memhdc%,v%%+6, w%%+6, 4,3,Z%
      SYS "GFX_bezierColor",@memhdc%,v%%+12,w%%+12,4,3,Z%
      SYS "GFX_bezierColor",@memhdc%,v%%+18,w%%+18,4,3,Z%

Please note that if you edit these lines 'in situ' the change will only last for the current session.  As soon as you restart BBCBasic it will revert to the standard library.  For any 'serious' testing I would copy both 'ellipse.bbc' (the library) and 'ellipses.bbc' (the demo program) into the @usr$ folder and edit the copied ellipses.bbc to load the library from @usr$ rather than @lib$.  That way you can make changes which will 'stick'.


Re: Problem with ellipsefill on Android using BBCSDL 1.00a

Richard Russell
 

On Fri, Feb 8, 2019 at 11:15 AM, gav wrote:
Can someone tell the exactly where to change the line segment value from 3 to 4 please so I can check if that helps.
There are eight  calls to bezierColor() in the PROCellipsefill section of the ellipse.bbc library:

      SYS "GFX_bezierColor",@memhdc%,v%%,   w%%,   4,3,Z%
      SYS "GFX_bezierColor",@memhdc%,v%%+6, w%%+6, 4,3,Z%
      SYS "GFX_bezierColor",@memhdc%,v%%+12,w%%+12,4,3,Z%
      SYS "GFX_bezierColor",@memhdc%,v%%+18,w%%+18,4,3,Z%
      SWAP Z%,@hpal%!(@vdu%?67*4)
      SWAP @vdu%?65,@vdu%?67
      PLOT 143,X%,Y%
      SYS "GFX_bezierColor",@memhdc%,v%%,   w%%,   4,3,Z%
      SYS "GFX_bezierColor",@memhdc%,v%%+6, w%%+6, 4,3,Z%
      SYS "GFX_bezierColor",@memhdc%,v%%+12,w%%+12,4,3,Z%
      SYS "GFX_bezierColor",@memhdc%,v%%+18,w%%+18,4,3,Z%

Please note that if you edit these lines 'in situ' the change will only last for the current session.  As soon as you restart BBCBasic it will revert to the standard library.  For any 'serious' testing I would copy both 'ellipse.bbc' (the library) and 'ellipses.bbc' (the demo program) into the @usr$ folder and edit the copied ellipses.bbc to load the library from @usr$ rather than @lib$.  That way you can make changes which will 'stick'.


Re: Problem with ellipsefill on Android using BBCSDL 1.00a

gav
 

Sorry for the blank message earlier. I was about to reply when I got called away and somehow my post was sent.

I must admit that I've only been following this thread at a distance and I've not been monitoring the finer details of the suggested fixes, due to an illness in the family.

Can someone tell the exactly where to change the line segment value from 3 to 4 please so I can check if that helps. What file is to be changed the program or the ellipses library? And which line?

I'm currently sat waiting in a hospital car park so can try the edit out while I'm here.

Thanks

Gavin



Sent from Samsung Mobile on O2

-------- Original message --------
From: Richard Russell <news@...>
Date: 08/02/2019 10:11 (GMT+00:00)
To: bb4w@groups.io
Subject: Re: [bb4w] Problem with ellipsefill on Android using BBCSDL 1.00a

On Fri, Feb 8, 2019 at 09:45 AM, Ken Orr wrote:
I am afraid it fails on "modern" android and Windows too.
Before or after the change from 3 line segments to 4?  Failure on Windows is likely to be unrelated, unless (very unusually) your display is configured for 16-bit colour.  You might want to check whether any updated graphics drivers are available for your PC.

  I have attached screenshots of ellipses.bbc
No you haven't, because attachments are not supported (I always access the group using its web interface, not by email)!  If you want to show screenshots please upload them to a suitable public web space and post a link.