Skip to content

WindowScaling

Narta Xaymar Dirks edited this page Nov 1, 2026 · 1 revision
BlitzLLVM

WindowScaling 〔BlitzLLVM〕

WindowScaling:Void mode:Int32
Parameter Mode Type Default Description
mode In Int32 required 1 to let the runtime scale the windows (the default), 0 to scale by yourself.

Description

〔BlitzLLVM〕 This command does not exist in the original Blitz products. BlitzLLVM adds it.

A BlitzLLVM extension: whether the runtime scales the windows of the program by the scale of their display. With 1, the default, a window on a display at 150 % has one and a half times the pixels of the size the program gave and its gadgets are drawn that much bigger, sharp, while the program keeps counting in its own units, as it does in the original, whose windows Windows scales. With 0 the program handles the scale itself: a unit is one pixel, a window is exactly as many pixels as the program says, and WindowScale tells what the display asks for, so the program can size its gadgets and draw its canvases by that. The windows that are open change right away, and send $805.

Differences

  • Not in the original. The environment variable BLITZLLVM_GUI_SCALE sets the scale for every window or turns the scaling off from outside the program, see DPI-Scaling.

Examples

WindowScaling 0
win = CreateWindow("Pixels", 20, 20, 300, 120, Desktop(), 15)
scale# = WindowScale(win)
SetGadgetShape win, 20, 20, 300 * scale, 120 * scale
CreateLabel "One unit is one pixel here.", 10 * scale, 10 * scale, 280 * scale, 20 * scale, win
Repeat
Until WaitEvent() = $803

Related Commands

ActivateWindow, ActiveWindow, CreateWindow, MaximizeWindow, WindowMaximized, WindowMenu, WindowMinimized, WindowScale 〔BlitzLLVM〕

Home · Command Index



Differences
Language Features
BlitzBasic
Blitz3D
BlitzPlus

Clone this wiki locally