User forums > Help

problem with wxSmith and Mac-OSX

<< < (5/7) > >>

Auria:
I tried both with still no luck :?

HOWEVER, i made a little experiment that most likely shows the issue.

i added

--- Code: ---if(!Bitmap->SaveFile(wxT("wxSmithScreen.bmp"),wxBITMAP_TYPE_BMP)) std::cout << "saving failed" << std::endl;

--- End code ---

at the end of FetchScreen(). I then opened wxSmith, then opened the generated file - and it was empty (transparent). So it seems like fetchScreen() doesn't work.

byo:

--- Quote from: Auria on June 06, 2007, 01:40:12 am ---I tried both with still no luck :?

HOWEVER, i made a little experiment that most likely shows the issue.

i added

--- Code: ---if(!Bitmap->SaveFile(wxT("wxSmithScreen.bmp"),wxBITMAP_TYPE_BMP)) std::cout << "saving failed" << std::endl;

--- End code ---

at the end of FetchScreen(). I then opened wxSmith, then opened the generated file - and it was empty (transparent). So it seems like fetchScreen() doesn't work.

--- End quote ---

Hmm, doesn't look very optimistic :(. But there is a way to fetch screen since splashscreen uses this. Maybe the screen is fetched in wrong time or maybe it's fetched properly but cleared right after :/

Could you check this code instead of the one you presented ? It will save each fetch at different bitmap and show number of fetches made. If at least one bitmap will have valid content, it would be huge milestone. There will also be a hint how many fetches are done after each change (it will put number of fetches done so far into stdout). The correct behavior would be to fetch only once after each resource change / editor content resize.


--- Code: ---static int Cnt = 0;
if(!Bitmap->SaveFile(wxString::Format(wxT("wxSmithScreen%d.bmp"),++Cnt),wxBITMAP_TYPE_BMP)) std::cout << "saving failed" << std::endl;
std::cout << "fetch " << Cnt << std::endl;

--- End code ---

Regards
   BYO

Auria:

--- Quote from: byo on June 12, 2007, 11:34:10 pm ---But there is a way to fetch screen since splashscreen uses this.

--- End quote ---

Actually no :( The splash screen on mac doesn't use any transparency... not sure why, afb could probably tell you.


--- Quote from: byo on June 12, 2007, 11:34:10 pm ---Could you check this code instead of the one you presented ?

--- End quote ---

The screen is not fetched too often, and images are always empty.

Seems like a good conadidate for wxBug report :(

afb:

--- Quote from: Auria on June 13, 2007, 01:23:02 am ---
--- Quote from: byo on June 12, 2007, 11:34:10 pm ---But there is a way to fetch screen since splashscreen uses this.

--- End quote ---

Actually no :( The splash screen on mac doesn't use any transparency... not sure why, afb could probably tell you.

--- End quote ---

Actually it does use transparency, but the old-skool Carbon apis that the wxMac port is using only supported window "regions" (i.e. black-white mask) and not full alpha-channel transparency for the windows...

The fetch screen sorta worked, but since it left a rect around the fetched area and other such artificats it didn't really fool anyone it was transparent. Looked more like "screen dump as background" or such.

byo:

--- Quote from: afb on June 13, 2007, 08:40:30 pm ---The fetch screen sorta worked, but since it left a rect around the fetched area and other such artificats it didn't really fool anyone it was transparent. Looked more like "screen dump as background" or such.

--- End quote ---

Hmm and that "screen dump as background" is exactly what I need :). Just need to find out why it fetches empty images instead of what's shown on the screen :?

Auria: I got another idea. Could you put ::wxSleep(few seconds) just before saving the bitmap into files ? It will delay there and let you see what's shown on the screen when the fetching routine runs. If it's empty content, that would mean that items are not shown properly, if it's content of edited window, it would mean that fetching routine is wrong.


BYO

Navigation

[0] Message Index

[#] Next page

[*] Previous page

Go to full version