It is currently Sat Nov 28, 2020 12:52 am

All times are UTC + 1 hour




Post new topic Reply to topic  [ 1 post ] 
Author Message
 Post subject: Window 10 (1903) and PB-v5.7x / Floating-Registers failure
PostPosted: Fri Apr 10, 2020 3:22 pm 
Offline
Addict
Addict
User avatar

Joined: Fri May 12, 2006 6:51 pm
Posts: 2730
Location: Germany
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

_________________
My Projects ThreadToGUI / OOP-BaseClass / OOP-BaseClassDispatch / EventDesigner V3
PB v3.30 / v5.70 - OS Mac Mini OSX 10.xx - VM Window Pro / Linux Ubuntu
Downloads on my Webspace


Top
 Profile  
Reply with quote  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 1 post ] 

All times are UTC + 1 hour


Who is online

Users browsing this forum: No registered users and 2 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
Jump to:  

 


Powered by phpBB © 2008 phpBB Group
subSilver+ theme by Canver Software, sponsor Sanal Modifiye