Page 1 of 1

Incorrect canvas display when the display is zoomed

Posted: Fri May 30, 2025 5:42 am
by Stefan

Code: Select all


Enumeration
  #window
  #canvas
  
  
EndEnumeration

OpenWindow(#window,0,0,800,600,"Test")

CanvasGadget(#canvas,10,10,300,300)

If StartDrawing(CanvasOutput(#canvas))
  LoadFont(0,"Arial",30)
  
  Box( 0,0,GadgetWidth(#canvas),GadgetHeight(#canvas),RGB(200,0,0))
  
  DrawingFont(FontID(0))  
  txt.s="This is line 1"
  
  DrawText(10,0,txt)
  txt.s="This is line 2"
  DrawText(GadgetWidth(#canvas),TextHeight(txt),txt)
  StopDrawing()
EndIf

If Windows or Linux zooms the display, the canvasgadget won't work properly. The same applies if a smartphone is zoomed in.
See images:

https://doko-cafe.de/test/canvaslinux.jpg

https://doko-cafe.de/test/canvaswindows10.jpg

Re: Incorrect canvas display when the display is zoomed

Posted: Mon Jun 02, 2025 8:21 am
by Fred
I don't think it's an SB issue, as if you zoom once all is rendered nothing is redrawn on SB side.

Re: Incorrect canvas display when the display is zoomed

Posted: Thu Jun 05, 2025 6:57 am
by Stefan
But the fact is that Windows and Linux enlarge everything on their own at certain resolutions.
In this case, you can't even use the Canvas gadget anymore. Especially since other gadgets work.

Re: Incorrect canvas display when the display is zoomed

Posted: Thu Jun 05, 2025 11:34 am
by Fred
I will dig more about this, to see if something can be done

Re: Incorrect canvas display when the display is zoomed

Posted: Thu Jul 31, 2025 6:19 am
by Stefan
Unfortunately this bug is not fixed.