Get the current Front and Back colours?

Everything else that doesn't fall into one of the other PB categories.
dmoc
Enthusiast
Enthusiast
Posts: 739
Joined: Sat Apr 26, 2003 12:40 am

Get the current Front and Back colours?

Post by dmoc »

So how to?
Karbon
PureBasic Expert
PureBasic Expert
Posts: 2010
Joined: Mon Jun 02, 2003 1:42 am
Location: Ashland, KY
Contact:

Post by Karbon »

Of what - a gadget, a window?
-Mitchell
Check out kBilling for all your billing software needs!
http://www.k-billing.com
Code Signing / Authenticode Certificates (Get rid of those Unknown Publisher warnings!)
http://codesigning.ksoftware.net
dmoc
Enthusiast
Enthusiast
Posts: 739
Joined: Sat Apr 26, 2003 12:40 am

Post by dmoc »

Sorry, should have been clearer: the colours set by BackColor() and FrontColor(). I've worked around it now but still curious because to clear an image I am using box(x, y, w, h, rgb(r,b,g)). Before this however I have a proc which sets the colour scheme, ie, SetColourScheme(Idx.l) for preset colours. Now if I want to clear only part of the image I'd like to use something like box(x, y, w, h, GetBackColour()). Alternative (or in addition) it would be nice to have Front/BackColor(rgb(r,g,b)). So I could...

bg = RGB(br, bg, bb)
fg = RGB(fr, fg, fb)
...
BackColor(bg): FrontColor(fg)
...
box(x, y, w, h, bg)
...
BackColor(fg): FrontColor(bg) ; Swap fg/bg colours
...
box(x, y, w, h, bg)
Post Reply