Code: Select all
Enumeration
#window
#temppic
#gadget
#font
EndEnumeration
; !document.body.style.zoom = 1 / window.devicePixelRatio * 100 + "%"
OpenWindow(#window,10,10,600,600,"Test")
CreateImage(#temppic,300,300,32,RGB(200,200,200))
StartDrawing(ImageOutput(#temppic))
DrawingMode(#PB_2DDrawing_Transparent)
LoadFont(#font,"Arial",22)
DrawingFont(FontID(#font))
s.s="This is line 1"
DrawText(1,1,s)
DrawText(1,1+TextHeight(s),"This is line 2")
StopDrawing()
ImageGadget(#gadget,10,10,ImageWidth(#temppic),ImageHeight(#temppic),ImageID(#temppic))
https://doko-cafe.de/test/drawtestnotzoomed.jpeg
With !document.body.style.zoom = 1 / window.devicePixelRatio * 100 + "%" it looks so:
https://doko-cafe.de/test/drawtestzoomed.jpeg