Resize breaking
#11
(08-01-2022, 10:14 PM)Kernelpanic Wrote: Interesting. I can't say anything about what the admin wrote because I don't have the knowledge.

It's just a little integer math, as easily demonstrated with the following:

Code: (Select All)
For i = 0 To 20
    limit = (i \ 4) * 4
    Print i, limit
Next

The "limit" above is always going to be a multiple of 4, rounded down.

Another simple way to get the same value would be: limit = i - i mod 4

As shown below:

Code: (Select All)
For i = 0 To 20
    limit = (i \ 4) * 4
    limit2 = i - i Mod 4
    Print i, limit, limit2
Next

It's just a method to keep the screensize suitable to match our given fontsize, without stray pixels left over to deal with.  Wink
Reply


Messages In This Thread
Resize breaking - by SMcNeill - 08-01-2022, 07:01 PM
RE: Resize breaking - by Pete - 08-01-2022, 07:19 PM
RE: Resize breaking - by SMcNeill - 08-01-2022, 07:21 PM
RE: Resize breaking - by SMcNeill - 08-01-2022, 07:49 PM
RE: Resize breaking - by TempodiBasic - 08-01-2022, 10:07 PM
RE: Resize breaking - by SMcNeill - 08-01-2022, 10:22 PM
RE: Resize breaking - by TempodiBasic - 08-01-2022, 09:00 PM
RE: Resize breaking - by admin - 08-01-2022, 09:13 PM
RE: Resize breaking - by SMcNeill - 08-01-2022, 09:17 PM
RE: Resize breaking - by Kernelpanic - 08-01-2022, 10:14 PM
RE: Resize breaking - by SMcNeill - 08-01-2022, 10:31 PM
RE: Resize breaking - by TempodiBasic - 08-01-2022, 10:59 PM



Users browsing this thread: 6 Guest(s)