Menu

#745 Printing in small screens affects printing in large screens

closed
dkl
None
gfxlib2
2015-09-20
2014-10-31
Matthew
No

See http://www.freebasic.net/forum/viewtopic.php?f=6&t=23000

screenres 231,30
print "test","test"
sleep
screen 18
print "test","test"
sleep

In both cases, "test" is wrapped onto separate lines, although in Screen 18 you'd usually expect them to fit easily on one line.

Possibly related bugs: [#88] and [#93]

Related

Bugs: #88
Bugs: #93

Discussion

  • dkl

    dkl - 2014-10-31

    This example tells me that screenres 231,30 allows 28 chars in one line:

    screenres 231, 60
    print "|123456789|123456789|123456789"
    print "test", "test"
    sleep
    

    so I'd expect the test/test to fit in the same line too, because it's just aligned to 14 (FB_TAB_WIDTH) + 4 = 18, nowhere near the 28 width limit.

    Interestingly, it works fine with a screen width of 232 pixels instead of 231 (then it can fit 29 chars per line).

     
  • dkl

    dkl - 2015-09-20
    • status: open --> closed
    • assigned_to: dkl
     
  • dkl

    dkl - 2015-09-20

    Hi,

    this should be fixed in Git now.

    Part 1: [3d34c5]

    The wrap-around into the next line happened too early (or at least that's what I think), which was especially noticable in small screen sizes.

    Part 2: [80b602]

    Similar to [#88], the cached screen width wasn't updated when opening a new graphics screen, or when the console window was resized. So if PRINT was used before the size change, it continued to use the old width value for padding calculations etc.

     

    Related

    Bugs: #88
    Commit: [3d34c5]
    Commit: [80b602]


Log in to post a comment.

MongoDB Logo MongoDB