Bug #801
Screen Open clips screen when Text columns & Rows are set. Also font size used is wrong.
Start date:
07/13/2021
Due date:
% Done:
0%
Estimated time:
1:00 h
Affected version:
Description
See right edge of snapshot to see clipping.
For example:
Screen Open 0,1920,1080,32,Lowres,60,30
The above should open a 1920 x 1080 screen with 60 columns and 30 lines of text.
To obtain this text screen size, the font should scale to 32 x 36 pixels:
1920 / 60 = 32 1080 / 30 = 36
Instead it is scaled in the opposite direction to 9.9180 x 16.5313.
Here's an example program to illustrate the problem:
cols=60 : lines=30 scrWidth=1920 : scrHeight=1080 Screen Open 0,scrWidth,scrHeight,32,Lowres,60,30 Curs Off : Flash Off : Palette 0,$FFFFFF,$77FF77 : Pen 1 : Paper 0 : Ink 1 : Cls 0 tb$=Chr$(9) Box 0,0 To scrWidth-1,scrHeight-1 Draw 0,0 To scrWidth-1,scrHeight-1 Draw 0,scrHeight-1 To scrWidth-1,0 Ink 1 ' Show columns For c=1 to cols Print Chr$(48+(c Mod 10)); Next Print Repeat$(tb$+".",26);" Right edge is clipped-->" Print "Above line is 60 chars long." Print Fix 3 f$="####.#### pixels." Print "Font width is: "; : Print Using f$; X Graphic(1) Print " should be: "; : Print Using f$; scrWidth/60 Print "Font height is: "; : Print Using f$; Y Graphic(1) Print " should be: "; : Print Using f$; scrHeight/30 ' Show lines Locate 0,7 For r=8 to lines Print Chr$(48+(r Mod 10)) Next r Print Locate 1, : Print "The numbers across show the 60 columns." Locate 1, : Print "The numbers across the left edge show the 30 rows." Ink 2 Box 0,0 To cols*X Graphic(1),lines*Y Graphic(1) Locate 1, : Print "The area bounded by the green rectangle should fill the screen!" Do Wait Vbl Loop
Files
Updated by Francois Lionet over 2 years ago
- Status changed from New to Resolved
- Assignee set to Francois Lionet
Fixed!
Updated by Brian Flanagan about 2 years ago
- Status changed from Resolved to Closed
Well, it works better now. Given that we can no longer specify the number of columns, it works within that new context.
I still say that we should be able to specify BOTH columns and lines.