PureBasic Forum
http://forums.purebasic.com/english/

Window 10 (1903) and PB-v5.7x / Floating-Registers failure
http://forums.purebasic.com/english/viewtopic.php?f=4&t=75069
Page 1 of 1

Author:  mk-soft [ Fri Apr 10, 2020 3:22 pm ]
Post subject:  Window 10 (1903) and PB-v5.7x / Floating-Registers failure

With Windows 10 and PB-v5.7x (x86) the VectorDrawing destroy the Floating-Point Registers (Floating-Point-Stack?)

Windows 7 and PB-v5.7x (x86) not problem
PB v5.7x (x64) no problem

Windows 10 bug :?:

Test-Code
Code:
EnableExplicit

LoadFont(0, "Segoe UI", 12)

Procedure.d GetLineHeight(Font)
  Protected r1.d
 
  If StartVectorDrawing(WindowVectorOutput(0))
    VectorFont(FontID(Font))
    r1 = VectorTextHeight("a")
    StopVectorDrawing()
  EndIf
 
  ProcedureReturn r1
EndProcedure

Procedure.d GetLineHeight2(Font)
  Protected r1.d
 
  If StartDrawing(WindowOutput(0))
    DrawingFont(FontID(Font))
    r1 = TextHeight("a")
    StopDrawing()
  EndIf
 
  ProcedureReturn r1
EndProcedure


Procedure.d GetWholeHeight()
   Protected Result.d
   
   Debug "VectorDrawing"
   Result = 0.0
   Debug "Ok: " + GetLineHeight(0)
   Result + GetLineHeight(0)
   Debug "Faild: " + Result
   
   Debug "2dDrawing"
   Result = 0.0
   Debug "Ok: " + GetLineHeight2(0)
   Result + GetLineHeight2(0)
   Debug "Ok: " + Result

  ProcedureReturn Result
EndProcedure

OpenWindow(0, 0, 0, 500, 300, "Test")
Debug "Result: " + GetWholeHeight()
Repeat : Until WaitWindowEvent() = #PB_Event_CloseWindow


German Link: https://www.purebasic.fr/german/viewtop ... 16&t=31950

Page 1 of 1 All times are UTC + 1 hour
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group
http://www.phpbb.com/