It is currently Mon May 21, 2018 9:47 pm

All times are UTC + 1 hour




Post new topic Reply to topic  [ 12 posts ] 
Author Message
 Post subject: [Done] PB5.46B2 Strange DrawText() behaviour...
PostPosted: Tue Dec 19, 2017 1:05 pm 
Offline
Addict
Addict
User avatar

Joined: Mon Jun 06, 2005 2:35 pm
Posts: 1133
Location: germany
Hi,

I tested this on Xubuntu 16.04 and KDE Neon and the result is strange:

Code:
If OpenWindow(0, 0, 0, 240, 240, "2DDrawing Example", #PB_Window_SystemMenu | #PB_Window_ScreenCentered)
  If CreateImage(0, 240, 240) And StartDrawing(ImageOutput(0))
    DrawingMode(#PB_2DDrawing_Transparent)
    Box(0, 0, 240, 240, RGB(255, 255, 255))
    For i = 1 To 30
      text.s = Str(Random(100))
      Debug text.s
      DrawText(Random(200), Random(200), text.s, RGB(Random(255), Random(255), Random(255)))
    Next i
    StopDrawing()
    ImageGadget(0, 0, 0, 200, 200, ImageID(0))
  EndIf
 
  Repeat
    Event = WaitWindowEvent()
  Until Event = #PB_Event_CloseWindow
EndIf


It draws the same numbers instead some random numbers...

Image



Can someone confirm this as a PureBasic Linux bug?


Top
 Profile  
Reply with quote  
 Post subject: Re: [PB5.46B2] Strange DrawText() behaviour...
PostPosted: Tue Dec 19, 2017 2:08 pm 
Offline
Addict
Addict
User avatar

Joined: Thu Apr 21, 2005 2:38 pm
Posts: 1502
Location: Germany
Confirmed for PB 5.46 Beta 2 x86 in ASCII and Unicode mode with GTK3 on Xubuntu 16.04 with Xfce. This problem doesn't occur when setting Library Subsystem to "gtk2".
And it doesn't occur in PB 5.45 x86 in ASCII and Unicode mode with both GTK2 and GTK3 !


Last edited by Shardik on Tue Dec 19, 2017 3:01 pm, edited 1 time in total.

Top
 Profile  
Reply with quote  
 Post subject: Re: [PB5.46B2] Strange DrawText() behaviour...
PostPosted: Tue Dec 19, 2017 2:25 pm 
Offline
Enthusiast
Enthusiast

Joined: Thu Aug 30, 2007 11:54 pm
Posts: 693
Location: right here
confirmed for Ubuntu 16.04, PB 5.46 LTS beta 2 x64.
works OK with 5.61 x64.


Top
 Profile  
Reply with quote  
 Post subject: Re: [PB5.46B2] Strange DrawText() behaviour...
PostPosted: Fri Dec 22, 2017 2:25 pm 
Offline
Addict
Addict
User avatar

Joined: Mon Jun 06, 2005 2:35 pm
Posts: 1133
Location: germany
Any chance to get this fixed in PB 5.46 LTS soon?


Top
 Profile  
Reply with quote  
 Post subject: Re: [PB5.46B2] Strange DrawText() behaviour...
PostPosted: Fri Dec 22, 2017 2:51 pm 
Offline
Enthusiast
Enthusiast

Joined: Thu Aug 30, 2007 11:54 pm
Posts: 693
Location: right here
You can awfully work around it by using separate Start/StopDrawing Blocks for each call of DrawText() if your use case can bear that performance-wise.


Top
 Profile  
Reply with quote  
 Post subject: Re: [PB5.46B2] Strange DrawText() behaviour...
PostPosted: Fri Dec 22, 2017 2:59 pm 
Offline
Addict
Addict
User avatar

Joined: Mon Jun 06, 2005 2:35 pm
Posts: 1133
Location: germany
Yes, I already found that workaround but I don't like to release a product with such nasty workaround. Going back to a previous compiler means going back to 5.24 LTS, because all versions between had serious bugs that stopped us from using it... The current 5.46b2 is the first version which compiles and runs in a way I can use it. Except the DrawText bug (for the moment). So we have to wait for the next version.


Top
 Profile  
Reply with quote  
 Post subject: Re: [PB5.46B2] Strange DrawText() behaviour...
PostPosted: Fri Dec 22, 2017 3:57 pm 
Offline
Addict
Addict
User avatar

Joined: Wed Dec 23, 2009 10:14 pm
Posts: 2653
Location: Boston, MA
Did you try Drawrotatedtext()?

_________________
The nice thing about standards is there are so many to choose from. ~ Andrew Tanenbaum


Top
 Profile  
Reply with quote  
 Post subject: Re: [PB5.46B2] Strange DrawText() behaviour...
PostPosted: Fri Dec 22, 2017 4:17 pm 
Offline
Addict
Addict
User avatar

Joined: Mon Jun 06, 2005 2:35 pm
Posts: 1133
Location: germany
No, not yet. I will have a look in January because I'm leaving for holidays until January 2nd in a few hours. Maybe Fred did an update (Beta 3?) until I'm back? :wink:


Top
 Profile  
Reply with quote  
 Post subject: Re: [PB5.46B2] Strange DrawText() behaviour...
PostPosted: Fri Dec 22, 2017 9:32 pm 
Offline
Addict
Addict
User avatar

Joined: Fri May 12, 2006 6:51 pm
Posts: 1219
Location: Germany
Confirmed on Ubuntu 1604x86, 1710x64

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


Top
 Profile  
Reply with quote  
 Post subject: Re: [PB5.46B2] Strange DrawText() behaviour...
PostPosted: Mon Jan 08, 2018 8:57 pm 
Offline
Administrator
Administrator

Joined: Fri May 17, 2002 4:39 pm
Posts: 13261
Location: France
Fixed. A new version has been uploaded on your account, so if you need this fix, feel free to download the 5.46 again.


Top
 Profile  
Reply with quote  
 Post subject: Re: [Done] PB5.46B2 Strange DrawText() behaviour...
PostPosted: Mon Jan 08, 2018 9:18 pm 
Offline
Addict
Addict
User avatar

Joined: Fri May 12, 2006 6:51 pm
Posts: 1219
Location: Germany
Works fine :D
Ubuntu 17.10; PB v5.46 (x64)

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


Top
 Profile  
Reply with quote  
 Post subject: Re: [Done] PB5.46B2 Strange DrawText() behaviour...
PostPosted: Sun Jan 14, 2018 3:27 pm 
Offline
PureBasic Expert
PureBasic Expert

Joined: Wed Oct 29, 2003 4:35 pm
Posts: 10405
Location: Beyond the pale...
Just encountered this bug and was about to post when I found this thread. :D

Confirmed that it works fine under PB 5.46.

Doesn't work under PB 5.62 beta 1 however. Fixed for beta 2?

_________________
I may look like a mule, but I'm not a complete ass.


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

All times are UTC + 1 hour


Who is online

Users browsing this forum: No registered users and 3 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