PureBasic 4.40 beta2 released.

Developed or developing a new product in PureBasic? Tell the world about it.
freak
PureBasic Team
PureBasic Team
Posts: 5929
Joined: Fri Apr 25, 2003 5:21 pm
Location: Germany

PureBasic 4.40 beta2 released.

Post by freak »

Hello again,

The beta2 is out with a lot of beta1 bugs fixed (not all yet), and a few more changes too:

Code: Select all

 - Added UsePostgreSQLDatabase()
 - Changed FillMemory() to FillMemory(*Memory, Size [, Value [, Type]])
 - Removed the "UserData" parameter from CustomGradient() and its callback (to fit the other PB callbacks)
 - Added #PB_2DDrawing_CustomFilter drawing mode (ImageOutput  only)
 - Added CustomFilterCallback()
 - Added AlphaBlend(Color1, Color2) - blend two 32bit colors
If you missed the Beta1 announcement, read more here:
http://www.purebasic.fr/english/viewtop ... 524#295524

The #PB_2DDrawing_CustomFilter redirects drawing operations to a callback. It can decide how the source color is put over the target color for every pixel. This mode can be combined with #PB_2DDrawing_Gradient. The callback looks like this:

Code: Select all

Procedure FilterCallback(x, y, SourceColor, TargetColor)
  ProcedureReturn AlphaBlend(SourceColor, TargetColor) ; this would emulate the #PB_2DDrawing_AlphaBlend mode
EndProcedure
As usual, the beta can be found on your user account.

Have fun :)
quidquid Latine dictum sit altum videtur
User avatar
Flype
Addict
Addict
Posts: 1542
Joined: Tue Jul 22, 2003 5:02 pm
Location: In a long distant galaxy

Post by Flype »

first downloader...........
UsePostgreSQLDatabase()
it's christmast day :)
No programming language is perfect. There is not even a single best language.
There are only languages well suited or perhaps poorly suited for particular purposes. Herbert Mayer
User avatar
Rescator
Addict
Addict
Posts: 1769
Joined: Sat Feb 19, 2005 5:05 pm
Location: Norway

Post by Rescator »

Oh for crying out loud, you guys suck....
I just installed beta1 the other night. *sighs and goes to download beta 2* :lol:
byo
Enthusiast
Enthusiast
Posts: 635
Joined: Mon Apr 02, 2007 1:43 am
Location: Brazil

Post by byo »

Thanks a lot. You guys are geniuses. :shock:
Proud registered Purebasic user.
Because programming should be fun.
LCD
Enthusiast
Enthusiast
Posts: 206
Joined: Sun Jun 01, 2003 10:55 pm
Location: Austria, Vienna
Contact:

Post by LCD »

Thanks! Great!
My PC
Ryzen 9 5950, 64 GB RAM, nVidia RTX A4000, Win 10
Ryzen 7 1700, 32 GB RAM, nVidia RTX A2000, Win 10
Seymour Clufley
Addict
Addict
Posts: 1233
Joined: Wed Feb 28, 2007 9:13 am
Location: London

Post by Seymour Clufley »

Fabulous! You implemented my idea! I thought you'd ignored it!

Damn I'm proud...
JACK WEBB: "Coding in C is like sculpting a statue using only sandpaper. You can do it, but the result wouldn't be any better. So why bother? Just use the right tools and get the job done."
LCD
Enthusiast
Enthusiast
Posts: 206
Joined: Sun Jun 01, 2003 10:55 pm
Location: Austria, Vienna
Contact:

Post by LCD »

AlphaBlend looks useful for me and the Image bug (Library Viewer) has gone. Excellent!
My PC
Ryzen 9 5950, 64 GB RAM, nVidia RTX A4000, Win 10
Ryzen 7 1700, 32 GB RAM, nVidia RTX A2000, Win 10
Seymour Clufley
Addict
Addict
Posts: 1233
Joined: Wed Feb 28, 2007 9:13 am
Location: London

Post by Seymour Clufley »

Freak, thankyou 100 times for adding the CustomFilter drawing mode. I think it will be very useful for a lot of programmers!

I don't know whether you added it because of my suggestion or not, but either way, the main reason I asked for it was for drawing text. Boxes and circles etc. could be drawn with procedures written by the programmer using Plot(), but drawing text and images really requires the CustomFilter system.

However, unfortunately, this can't be done unless the CustomFilter mode is combined with Transparent mode:

Code: Select all

DrawingMode(#PB_2DDrawing_CustomFilter|#PB_2DDrawing_Transparent)
Would that be possible?

Also, there seems to be a problem if the callback procedure takes in the x and y as floats. It only works if they're integers. Is that a bug? Haven't tried it with doubles yet.

Please see about combining CustomFilter and Transparent. But either way, thanks for all the work you've done. For me personally this has been a fantastic upgrade to PB. :)
JACK WEBB: "Coding in C is like sculpting a statue using only sandpaper. You can do it, but the result wouldn't be any better. So why bother? Just use the right tools and get the job done."
User avatar
Progi1984
Addict
Addict
Posts: 806
Joined: Fri Feb 25, 2005 1:01 am
Location: France > Rennes
Contact:

Post by Progi1984 »

User avatar
blueb
Addict
Addict
Posts: 1044
Joined: Sat Apr 26, 2003 2:15 pm
Location: Cuernavaca, Mexico

Post by blueb »

Code: Select all

 - Added UsePostgreSQLDatabase() 
WooHoo!
I thought this would take a while, becasue Fred was just talking a few weeks ago about the MySQL licensing disappointment!

Thanks Fred
- It was too lonely at the top.

System : PB 6.10 LTS (x64) and Win Pro 11 (x64)
Hardware: AMD Ryzen 9 5900X w/64 gigs Ram, AMD RX 6950 XT Graphics w/16gigs Mem
User avatar
flaith
Enthusiast
Enthusiast
Posts: 704
Joined: Mon Apr 25, 2005 9:28 pm
Location: $300:20 58 FC 60 - Rennes
Contact:

Post by flaith »

La classe internationale :D
“Fear is a reaction. Courage is a decision.” - WC
Xombie
Addict
Addict
Posts: 898
Joined: Thu Jul 01, 2004 2:51 am
Location: Tacoma, WA
Contact:

Post by Xombie »

How does UsePostgreSQLDatabase() connect and access information? ODBC or a native connection? Are there any database changes that go with it? Are we still stuck with limitations like not being able to get a row count and only being able to access rows and columns in order once from row/column 0 to the max?
User avatar
GeBonet
Enthusiast
Enthusiast
Posts: 135
Joined: Fri Apr 04, 2008 6:20 pm
Location: Belgium

Post by GeBonet »

Tanks....

But i have this :

An Error has been detected in the IDE !
ERROR : Ivalid memory access
File : c:\svn\v4.40\Fr34k\PureBasaicIDE.addTools.pb
Line : 50


Sorry :(
Num3
PureBasic Expert
PureBasic Expert
Posts: 2810
Joined: Fri Apr 25, 2003 4:51 pm
Location: Portugal, Lisbon
Contact:

Post by Num3 »

GeBonet wrote:Tanks....

But i have this :

An Error has been detected in the IDE !
ERROR : Ivalid memory access
File : c:\svn\v4.40\Fr34k\PureBasaicIDE.addTools.pb
Line : 50


Sorry :(
Same here...

You have to delete the Purebasic directory under "C:\Users\%yourusernamehere%\AppData\Roaming" then it works.
User avatar
GeBonet
Enthusiast
Enthusiast
Posts: 135
Joined: Fri Apr 04, 2008 6:20 pm
Location: Belgium

Post by GeBonet »

Post Reply