Author Topic: Is there a way to scale a window other than _FULLSCREEN?  (Read 6905 times)

0 Members and 1 Guest are viewing this topic.

Offline SMcNeill

  • QB64 Developer
  • Forum Resident
  • Posts: 3972
    • View Profile
    • Steve’s QB64 Archive Forum
Re: Is there a way to scale a window other than _FULLSCREEN?
« Reply #15 on: August 13, 2020, 04:13:10 am »
If I ever posted any of my programs on here I'm sure SMcNeill would find 200 memory leaks.
Speaking of which, I gotta try out that code he posted.

Edit: Tried it out. The Screen function isn't compatible with it (it even throws up an error).

Which code?  This little snippet?

SCREEN _NEWIMAGE(Width, Height, 0)
F = _LOADFONT(“cour.ttf”, 32, “monospace”)
_FONT F

What's the error?  Font not found?  Width or Height being 0?  I didn't place the code in a code box as you'd need to specify all those elements -- desired width and height in columns and rows, and the path to your favorite mono space font on your system.  ;)
https://github.com/SteveMcNeill/Steve64 — A github collection of all things Steve!

Offline manstersoft

  • Newbie
  • Posts: 22
    • View Profile
    • My Games
Re: Is there a way to scale a window other than _FULLSCREEN?
« Reply #16 on: August 13, 2020, 11:02:59 am »
No, I changed all of the variables. Like I said, the SCREEN Function throws an error.
Code: QB64: [Select]
  1. SCREEN _NEWIMAGE(640, 480, 256)
  2. F = _LOADFONT("myfont.ttf", 32, "monospace") 'replacing with F = 8 works fine
  3. PRINT "TESTING"
  4.  
I get an illegal function call on line 5.

Could it be a glitch?

Edit: Ah, it is a glitch.
Using SCREEN 0 wile using a custom font works fine.
Using SCREEN _NEWIMAGE(,,256) without a custom font works fairly well (there's that non COLOR ,0 " " as block issue).
But, you can't do both SCREEN _NEWIMAGE(,,256) and a Custom Font and use SCREEN()
« Last Edit: August 13, 2020, 11:35:49 am by manstersoft »

Offline bplus

  • Global Moderator
  • Forum Resident
  • Posts: 8053
  • b = b + ...
    • View Profile
Re: Is there a way to scale a window other than _FULLSCREEN?
« Reply #17 on: August 13, 2020, 12:05:12 pm »
Yeah I remember some problem I had using the SCREEN function (default font) and it was probably with SCREEN _NEWIMAGE, I think I was trying to get characters/text.

@manstersoft may I ask why you prefer 256 color mode? To be compatible to old programs? That's the way you learned color? I made jump from 16 colors (1990's) to _RGB in 2014 and thought I died and went to heaven!
« Last Edit: August 13, 2020, 12:06:44 pm by bplus »

Offline manstersoft

  • Newbie
  • Posts: 22
    • View Profile
    • My Games
Re: Is there a way to scale a window other than _FULLSCREEN?
« Reply #18 on: August 13, 2020, 10:45:29 pm »
@manstersoft may I ask why you prefer 256 color mode? To be compatible to old programs? That's the way you learned color? I made jump from 16 colors (1990's) to _RGB in 2014 and thought I died and went to heaven!
I like using palettes.