vector circles are ellipses on some computers
Posted: Fri Sep 16, 2022 1:40 pm
It must be silly but do you have any idea why in few computers, the screen displays an ellipse with the circle function and a circle with the "ellipse" function below ?
All computers have:
OS = Windows
dpiX = 1.0, dpiY=1.0 (96 dpi)
compiled with the option dpi aware or not give the same result.
text zoom = normal = 100%
Resolution: 1024x768 (or any others)
Thanx.
M.

All computers have:
OS = Windows
dpiX = 1.0, dpiY=1.0 (96 dpi)
compiled with the option dpi aware or not give the same result.
text zoom = normal = 100%
Resolution: 1024x768 (or any others)
Thanx.
M.
Code: Select all
; OS = Windows
; dpiX=1.0, dpiY=1.0, compiled with the option dpi aware or not.
; zoom 100%
; Resolution: 1024x768
ExamineDesktops()
ResolutionX.d=DesktopWidth(0)
ResolutionY.d=DesktopHeight(0)
Excentricite.d = ResolutionY/ResolutionX
; Excentricite.d = 1.0
If OpenWindow(0, 0, 0, 600, 600, "VectorDrawing", #PB_Window_SystemMenu | #PB_Window_ScreenCentered)
CanvasGadget(0, 0, 0, 600, 600)
If StartVectorDrawing(CanvasVectorOutput(0))
;cross
MovePathCursor(300,0)
AddPathLine(300, 600)
MovePathCursor(0,300)
AddPathLine(600, 300)
StrokePath(1)
;circle red -> shown as an ellipse in my screen
MovePathCursor(300, 300)
AddPathCircle(300, 300, 200)
VectorSourceColor(RGBA(255, 0, 0, 255))
StrokePath(3)
;ellipse blue -> shown as a circle !
MovePathCursor(300, 300)
AddPathEllipse(300, 300, 300*Excentricite, 300)
VectorSourceColor(RGBA(0, 0, 255, 255))
StrokePath(3)
StopVectorDrawing()
EndIf
Repeat
Event = WaitWindowEvent()
Until Event = #PB_Event_CloseWindow
EndIf