Line 1 disappears - Printable Version +- QB64 Phoenix Edition (https://staging.qb64phoenix.com) +-- Forum: QB64 Rising (https://staging.qb64phoenix.com/forumdisplay.php?fid=1) +--- Forum: Code and Stuff (https://staging.qb64phoenix.com/forumdisplay.php?fid=3) +---- Forum: Help Me! (https://staging.qb64phoenix.com/forumdisplay.php?fid=10) +---- Thread: Line 1 disappears (/showthread.php?tid=655) |
Line 1 disappears - BDS107 - 07-20-2022 I have a question. My program starts with the command $RESIZE:SMOOTH in SCREEN 0 (text mode). Everything works perfectly but if you want to maximize the screen the first row disappears. What can I do about it? I know there is a command _FULLSCREEN _SQUAREPIXELS , _SMOOTH but I don't want it. Here's a demo: Code: (Select All) $RESIZE:SMOOTH RE: Line 1 disappears - bplus - 07-22-2022 Hi @BDS107, This works on my system Win 10 Laptop: Code: (Select All) $Resize:On There is not a loss of clarity of image. It appears to increase rows and cols as opposed to expanding the image. RE: Line 1 disappears - SMcNeill - 07-22-2022 When I maximize, the first 4 rows disappear on my display, but when I minimize, they come back as normal. Something is off with the scaling factor when $RESIZE:SMOOTH and $RESIZE:STRETCH is used, and this needs to be recorded as a bug so it can be fixed when one of the developers have time to look into the issue. Right now, the only solution would be to use $RESIZE:ON and then check for size changes and scale your display manually to adjust for them, and that's a lot more work than just adding a simple $RESIZE:SMOOTH to the top of your code. RE: Line 1 disappears - SMcNeill - 07-22-2022 The issue here can be easily diagnosed and explained. Take the code you wrote and run it. Now, manually grab the corner of the screen and drag the window until it'd be full screen. As soon as you let go of the mouse button, the screen then will "snap" back to where it can display as much as possible with maintaining the original aspect ration. When you click the maximize button, it doesn't center the screen and place black bars along the edges to maintain your aspect ratio (like you see with many older movies and tv shows when they play on todays modern television sets). Instead, it scales the image so that it fills the screen completely, even if it has to clip off part of the screen when it does so. The choices here, for this type of fix, would be to: 1) Either stretch the image to fit the whole screen and not pay any attention to the aspect ratio. (Some shows do this, which can lead to distorted faces and elongated circles and such being prominent.) or 2) Maximize the image so that it fits the screen as much as possible, and then center it and add those black border bars along the edges to maintain the proper ratio. I don't know which of these solutions would be easiest to implement, or even if OpenGL allows for easily making such adjustments, so the fix for this might be a while before it comes. For now, I'd suggest just grabbing the corner of the window and resizing it to the size you want with the mouse, without making use of that maximize button at all. RE: Line 1 disappears - SMcNeill - 07-22-2022 Issue reported and logged in the repo. I don't know when someone will sort out where it's at and get around to fixing it, but at least it's a known issue now. https://github.com/QB64-Phoenix-Edition/QB64pe/issues/128 RE: Line 1 disappears - BDS107 - 07-22-2022 Hi, thanks for looking and reporting this as a bug. When I'm home I'll take a look at this. Now, I'm on vacation in London. RE: Line 1 disappears - BDS107 - 07-24-2022 Here's another and better example. When $RESIZE:SMOOTH is used, the first 2 lines disappear during maximization. Resize Window is then OK. With $RESIZE:ON maximizing and resize doesn't work for me. Code: (Select All) $RESIZE:ON Here the result: RE: Line 1 disappears - SMcNeill - 07-24-2022 With $RESIZE:ON, you have to manually handle resize events yourself. They screen doesn't auto-scale. (Think of how the IDE adds rows and columns but doesn't adjust font size, when you expand it.) RE: Line 1 disappears - admin - 07-24-2022 Here's a quick demo of manually using $RESIZE:ON to change the number of rows and columns which are available on screen, without scaling the display image itself: Code: (Select All) $Resize:On RE: Line 1 disappears - admin - 07-24-2022 And here's a demo of using $RESIZE:ON to scale the screen, like you were originally intending: Code: (Select All) $Resize:On Note that it's up to you to maintain the same aspect ratio, which I didn't do here to illustrate how things can "stretch" and distort if you don't do so when manually resizing like this. |