Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
why am I seeing the spaces?
#1
Why am I seeing the colored spaces in this program? Shouldn't     _printmode _keepbackground  be prohibiting this?


[Image: image.png]

Code: (Select All)
Screen _NewImage(512, 384, 32)
rootpath$ = Environ$("SYSTEMROOT") 'normally "C:\WINDOWS"
fontfile$ = rootpath$ + "\Fonts\comic.ttf" 'TTF file in Windows
style$ = "" 'font style is not case sensitive

f& = _LoadFont(fontfile$, 16, style$)
_Font f&
Line (1, 1)-(510, 382), _RGB32(50, 50, 50), BF
_PrintMode _KeepBackground
Color _RGB32(255, 255, 255), _RGB32(170, 70, 70)
Do
    Input txt$
    Print _PrintWidth(txt$), txt$
Loop Until txt$ = "END"
Reply
#2
Looks to me like it's a glitch in _PRINTMODE which isn't keeping the background with the Comma spacing.

Try this instead:

Code: (Select All)
Screen _NewImage(512, 384, 32)
rootpath$ = Environ$("SYSTEMROOT") 'normally "C:\WINDOWS"
fontfile$ = rootpath$ + "\Fonts\comic.ttf" 'TTF file in Windows
style$ = "" 'font style is not case sensitive

f& = _LoadFont(fontfile$, 16, style$)
_Font f&
Line (1, 1)-(510, 382), _RGB32(50, 50, 50), BF
'_PrintMode _KeepBackground
Color _RGB32(255, 255, 255), 0

Do
    Input txt$
    Print _PrintWidth(txt$), txt$
Loop Until txt$ = "END"
Reply
#3
It's not printing when it tabs to column for the comma so the red background is coming up?

Definitely a weird glitch. Tab() works and I bet _PrintString will too.
b = b + ...
Reply
#4
We're digging into it.  At the moment, it appears that TAB() doesn't honor _KEEPBACKGROUND at all.  At first glance, this looks like a simple issue to patch quickly and without any major headache.  Wink
Reply
#5
(09-21-2023, 01:27 AM)SMcNeill Wrote: We're digging into it.  At the moment, it appears that TAB() doesn't honor _KEEPBACKGROUND at all.  At first glance, this looks like a simple issue to patch quickly and without any major headache.  Wink

Ha I just tested tab() do you mean comma?
b = b + ...
Reply
#6
(09-21-2023, 01:29 AM)bplus Wrote:
(09-21-2023, 01:27 AM)SMcNeill Wrote: We're digging into it.  At the moment, it appears that TAB() doesn't honor _KEEPBACKGROUND at all.  At first glance, this looks like a simple issue to patch quickly and without any major headache.  Wink

Ha I just tested tab() do you mean comma?

Comma *is* tab().
TAB is func_tab().

Two different beasts in the c-side of things.  It's the tab() in libqb.cpp that's glitching, not func_tab().  Wink
Reply
#7
Looks like the fix for this is all worked up and is just waiting for review and approval.  It should be in the repo by the weekend at the latest, I'd imagine.  Wink
Reply
#8
@James D Jarvis great find!

The whole screen is cleared to black before `INPUT`. I tried this on Linux. Put in `CLS` just after `_NEWIMAGE` to clear the screen to the red color, then `_PRINTMODE` line. I didn't have "Comic" font available so I used "DejaVuSans" normal in its place. But it should make no difference with any TTF font.
Reply
#9
(09-21-2023, 02:43 AM)SMcNeill Wrote: Looks like the fix for this is all worked up and is just waiting for review and approval.  It should be in the repo by the weekend at the latest, I'd imagine.  Wink
Wow, that was fast. This is why I recommend the PE version of QB64 ... active development.
New to QB64pe? Visit the QB64 tutorial to get started.
QB64 Tutorial
Reply
#10
(09-21-2023, 03:14 AM)TerryRitchie Wrote:
(09-21-2023, 02:43 AM)SMcNeill Wrote: Looks like the fix for this is all worked up and is just waiting for review and approval.  It should be in the repo by the weekend at the latest, I'd imagine.  Wink
Wow, that was fast. This is why I recommend the PE version of QB64 ... active development.

We try.  Not all things are as quick and easy to fix, but when you guys point stuff out to us, we do try to look into it ASAP.  Smile
Reply




Users browsing this thread: 1 Guest(s)