News:

Accounts with zero posts and zero activity during the last months will be deleted periodically to fight SPAM!

Main Menu

Transparent splash screen

Started by afb, November 03, 2006, 09:49:50 PM

Previous topic - Next topic

afb

The transparent splash screen (splash_new.png) doesn't work on Mac OS X:



Should we default it to "off", or should we use the old splash ? (splash.png)

thomas

There sure is a way to implement it under MacOS, I just don't happen to know one.
Probably, it even supports hardware transparency and doesn't need that screengrab-blit-hack we're using because of Windows 98.
"We should forget about small efficiencies, say about 97% of the time: Premature quotation is the root of public humiliation."

afb

Fixing it would be best, of course. Just that this was easier... :-)
I take it that we don't want to use the old one then, good riddance.

Can always have it default to "hidden" on wxMac, until it is fixed.

Ceniza

Hmmm... the screengrab-blit-hack was to get it working on Linux...

afb: could you check the splash screen demo included in wxWidgets' sources and see if it works correctly there?

afb

#4
wxFRAME_SHAPED class window "works", but since it seems wx 2.6.3 uses QuickDraw and the Window Manager it is limited to a single "transparent color" type of alpha, and not the full alpha channel that the splash uses (need CoreGraphics for that).

So the best is probably to turn it off for now, and perhaps try again later with wx 2.7.x ?

takeshimiya

Quote from: afb on November 04, 2006, 01:56:36 AM
So the best is probably to turn it off for now, and perhaps try again later with wx 2.7.x ?
Yes, I actually turn it off now; for wx 2.7 CoreGraphics is enabled by default, and there's a chance that QuickDraw will be deprecated, so better we wait.

afb

Here were the end results, when using SHAPED=1 (wxFRAME_SHAPED):

ALPHA=0 (i.e. using a white color)


ALPHA=1 (it doesn't work on wxMac)


I'll upload the patch with SHAPED=0, in case it starts to work later on...


#if 0 // defined(__WXMAC__)
#define CBSPLASH_SHAPED 1
#define CBSPLASH_STYLE wxFRAME_SHAPED
#define CBSPLASH_ALPHA 0
#else
#define CBSPLASH_SHAPED 0
#define CBSPLASH_STYLE 0
#define CBSPLASH_ALPHA 1
#endif


thomas

Quote from: afb on November 04, 2006, 03:07:04 AMHere were the end results, when using SHAPED=1 (wxFRAME_SHAPED)
ALPHA=0 (i.e. using a white color)
Hey, that doesn't even look entirely bad! Different, yes... but not really bad. If one added a bit more border on the left and top-left to the image, it would look like it's actually intended to be that way (though I doubt it's worth the effort). What do you think, should I have a try?

Why don't you just commit it that way and leave it until they update wxMAC :)
"We should forget about small efficiencies, say about 97% of the time: Premature quotation is the root of public humiliation."

afb

Quote from: thomas on November 04, 2006, 04:45:18 AM
Quote from: afb on November 04, 2006, 03:07:04 AMHere were the end results, when using SHAPED=1 (wxFRAME_SHAPED)
ALPHA=0 (i.e. using a white color)
Hey, that doesn't even look entirely bad! Different, yes... but not really bad. If one added a bit more border on the left and top-left to the image, it would look like it's actually intended to be that way (though I doubt it's worth the effort). What do you think, should I have a try?

If it's not too much work and don't disturb the other platforms, then by all means do...

afb

Quote from: thomas on November 04, 2006, 04:45:18 AM
Why don't you just commit it that way and leave it until they update wxMAC :)

No change in wx 2.7.2, so this is going in as-is. Maybe tweak the image a little ?

thomas

Try if that one works out better, it should have a border contour with alpha = 0.01 (i.e. should be invisible under Windows, but white using your method).

[attachment deleted by admin]
"We should forget about small efficiencies, say about 97% of the time: Premature quotation is the root of public humiliation."

afb

Not sure if it made that much of a difference:


If we want good results, I think we need a separate black/white mask ?
(which does require some extra coding work, and another parameter, but)

thomas

Hmm.... surprised that the top left corner looks so meek... is the window's size hardcoded?
There should actually be an equally-sized border around it everywhere.

Hmph... hate it when things look so cheap. Might think of a contour that works nicely with CSG, then we can do Windows98/X11/MacOS with hardware region support and without any hacks.
"We should forget about small efficiencies, say about 97% of the time: Premature quotation is the root of public humiliation."

Der Meister

Although I like the new design of the splash screen, is it really supposed to look like that?  :D

Testet on Linux with wxGTK 2.6.2, gcc 4.1.1 and revision, well, you probably can see that. :P
Real Programmers don't comment their code. If it was hard to write, it should be hard to understand.
Real Programmers don't write in BASIC. Actually, no programmers write in BASIC, after the age of 12.