Incorrect canvas display when the display is zoomed

Just starting out? Need help? Post your questions and find answers here.
Stefan
Posts: 248
Joined: Mon Feb 05, 2018 9:44 pm

Incorrect canvas display when the display is zoomed

Post 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
Fred
Site Admin
Posts: 1820
Joined: Mon Feb 24, 2014 10:51 am

Re: Incorrect canvas display when the display is zoomed

Post 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.
Stefan
Posts: 248
Joined: Mon Feb 05, 2018 9:44 pm

Re: Incorrect canvas display when the display is zoomed

Post 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.
Fred
Site Admin
Posts: 1820
Joined: Mon Feb 24, 2014 10:51 am

Re: Incorrect canvas display when the display is zoomed

Post by Fred »

I will dig more about this, to see if something can be done
Stefan
Posts: 248
Joined: Mon Feb 05, 2018 9:44 pm

Re: Incorrect canvas display when the display is zoomed

Post by Stefan »

Unfortunately this bug is not fixed.
Post Reply