Changing font-size in _rgb32 mode
#16
Code: (Select All)
Screen _NewImage(800, 600, 32)
h& = _LoadFont("C:\Windows\Fonts\courbd.ttf", 18)
_Font h&
For i = 1 To 33
    Locate i, i: Print i;
Next
Sleep


Locate 400, 300 'This will ERROR on you as it's waaay off the screen
Locate 20, 300: Print "Hello after the ERROR"
Sleep
System


An example to showcase the error for you and why you're seeing it.

Notice without the "monospace" being specificized, the second half of the locate is working with a basic fontwidth of 1 pixel (the smallest possible), but the first half of the locate is -- like always -- in relation to the row we want to print upon.

At LOCATE 400, 300, we generate an error as we simply don't have 400 lines upon the screen with which to print to.
Reply


Messages In This Thread
RE: Changing font-size in _rgb32 mode - by bplus - 04-08-2023, 01:51 PM
RE: Changing font-size in _rgb32 mode - by bplus - 04-08-2023, 05:10 PM
RE: Changing font-size in _rgb32 mode - by SMcNeill - 04-08-2023, 10:39 PM



Users browsing this thread: 9 Guest(s)