Search found 188 matches

by Parduz
Thu Oct 13, 2022 10:43 am
Forum: Platform Related Issues
Topic: Configure error: gtk+-2.0 not found
Replies: 28
Views: 9752

Configure error: gtk+-2.0 not found

I'm trying to use Windows Subsystem Linux to be able to cross-compile an app for ARM using my Windows 10 pc. I've installed Debian 11 (no UI), in the WSL, and in Debian installed what i think is what i need: sudo apt-get install libgtk-3-dev build-essential checkinstall sudo apt install gcc make gcc...
by Parduz
Fri Sep 30, 2022 4:10 pm
Forum: C++ Development
Topic: Pre-draw and alpha-blend two bitmaps
Replies: 16
Views: 1241

Re: Pre-draw and alpha-blend two bitmaps

doublemax wrote: Fri Sep 30, 2022 4:06 pm

Code: Select all

wxBitmap bmp(512, 512, 32);
From my first post, the "32" makes sure the bitmap has an alpha channel.
I don't know what to say:

Code: Select all

		AlphaBmp = new Bmp(dst_width, dst_height, 32);
		AlphaBmp->UseAlpha();
It made the difference, here.

Thanks :)
by Parduz
Fri Sep 30, 2022 4:01 pm
Forum: C++ Development
Topic: Pre-draw and alpha-blend two bitmaps
Replies: 16
Views: 1241

Re: Pre-draw and alpha-blend two bitmaps

Can you show the whole code that's involved in this? Uh, i'd need to remove a lot of unuseful stuffs before. BUT added AlphaBmp->UseAlpha(); and now it works. I'd bet that you can check it in your minimal code sample, if you "generate" your alphabmp (with the first code you posted) instea...
by Parduz
Fri Sep 30, 2022 3:52 pm
Forum: C++ Development
Topic: Pre-draw and alpha-blend two bitmaps
Replies: 16
Views: 1241

Re: Pre-draw and alpha-blend two bitmaps

Windows 10.

If i load the _ALPHA_.png instead of using the DrawAlphaImage() it works!

Code: Select all

//DrawAlphaImage();
AlphaBmp->LoadFile( "d:\\_ALPHA_.png", wxBITMAP_TYPE_PNG );
I'm really lost!
by Parduz
Fri Sep 30, 2022 3:08 pm
Forum: C++ Development
Topic: Pre-draw and alpha-blend two bitmaps
Replies: 16
Views: 1241

Re: Pre-draw and alpha-blend two bitmaps

inserted in my rendering code: ... DrawAlphaImage(); AlphaBmp->SaveFile( "d:\\_ALPHA_.png", wxBITMAP_TYPE_PNG ); FinalBmp->SaveFile( "d:\\_FINAL_.png", wxBITMAP_TYPE_PNG ); wxMemoryDC mdc( *FinalBmp ); mdc.DrawBitmap( *AlphaBmp, 0, 0, true); mdc.SelectObject( wxNullBitmap ); Fina...
by Parduz
Fri Sep 30, 2022 2:50 pm
Forum: C++ Development
Topic: Pre-draw and alpha-blend two bitmaps
Replies: 16
Views: 1241

Re: Pre-draw and alpha-blend two bitmaps

The saved PNG is transparent.

So there's something wrong in my other code...
could be 'cause

Code: Select all

this->SetBackgroundStyle(wxBG_STYLE_PAINT);
in my class constructor?
by Parduz
Fri Sep 30, 2022 2:28 pm
Forum: C++ Development
Topic: Pre-draw and alpha-blend two bitmaps
Replies: 16
Views: 1241

Re: Pre-draw and alpha-blend two bitmaps

The code i posted show how to create a wxBitmap with transparent background in the first place, because i thought that was the main question. Yup, me too :D (seriously: it was). But i'm unable to blend it: instead it just "cover" the background. This is my paint event: void TScannerImage:...
by Parduz
Fri Sep 30, 2022 1:25 pm
Forum: C++ Development
Topic: Pre-draw and alpha-blend two bitmaps
Replies: 16
Views: 1241

Re: Pre-draw and alpha-blend two bitmaps

Thanks.

So, to alphablend that bmp over my bacground, do i have to convert the bmp to an image and paste it on my background image?
EDIT
my english is bad. What i meant is:
now that i have that bmp, how can i blend it in paint event?
by Parduz
Fri Sep 30, 2022 9:19 am
Forum: C++ Development
Topic: Pre-draw and alpha-blend two bitmaps
Replies: 16
Views: 1241

Pre-draw and alpha-blend two bitmaps

I'm currently using wxWidgets 3.0.4 but i plan to upgrade to the 3.1.x in the next months, and my program runs both on Windows and Debian. I've buil a component class derived from wxPanel. It draws a complex bitmap (lets call it bkgrBmp ) which is stored in memory 'cause drawing it is slow, so the ...
by Parduz
Thu Aug 25, 2022 3:35 pm
Forum: Platform Related Issues
Topic: CrossCompiling WXWidgets 3.1.7 on Windows for Arm-Linux
Replies: 0
Views: 75561

CrossCompiling WXWidgets 3.1.7 on Windows for Arm-Linux

On Windows 10, I have downloaded the arm-none-linux-gnueabihf 9.2 toolchain from the ARM developer site , configured Code::Block to use it and succesfully compiled a console "Hello World" for a Beablebone Black running Debian 7. Now, i would like to cross-compile the WXWidgets and build a ...
by Parduz
Mon Apr 19, 2021 12:28 pm
Forum: Platform Related Issues
Topic: Getting windows mousepointer icon = black square
Replies: 25
Views: 12259

Re: Getting windows mousepointer icon = black square

The issue just has been fixed in wxWidgets master: https://github.com/wxWidgets/wxWidgets/commit/b889f6897ba8429c02e598ee9d5a366347fef477 Great!. But.... should'nt the new code be inside the "if ( hbmp )" branch, instead of outside of it? (just 'cause i'm gonna recompile my widgets so i w...
by Parduz
Fri Apr 16, 2021 3:45 pm
Forum: Platform Related Issues
Topic: Getting windows mousepointer icon = black square
Replies: 25
Views: 12259

Re: Getting windows mousepointer icon = black square

This is a try to get the color one (i modified your sample): WHY it does'nt work? I think there is a bug, you are always missing "!" when checking the result of ::GetObject(), this function returns zero on failure, non-zero otherwise. I did not read the rest of the code. I check his retur...
by Parduz
Fri Apr 16, 2021 3:27 pm
Forum: Platform Related Issues
Topic: Getting windows mousepointer icon = black square
Replies: 25
Views: 12259

Re: Getting windows mousepointer icon = black square

Ok, but: BITMAP bmMask,bmCurs; if ( !ii.hbmMask ) { wxLogMessage("NO Cursor Mask???"); return false; }else{ if( GetObject(ii.hbmMask, sizeof(bmMask), &bmMask) != sizeof(bmMask) ) { wxLogError("Could not get BITMAP from the mask."); return false; } wxLogMessage("Cursor Ma...
by Parduz
Fri Apr 16, 2021 3:20 pm
Forum: Platform Related Issues
Topic: Getting windows mousepointer icon = black square
Replies: 25
Views: 12259

Re: Getting windows mousepointer icon = black square

Anyway, i still wonder WHY we should use the wxIcon, and then the wxBitmap, while the IconInfo.hbmColor and hbmMask already are the HBITMAP we need. You cans use them but for monochrome cursors, you need to do what wxWidgets attempts to do, i.e., properly blend the two parts of the mask... I'd like...
by Parduz
Fri Apr 16, 2021 3:16 pm
Forum: Platform Related Issues
Topic: Getting windows mousepointer icon = black square
Replies: 25
Views: 12259

Re: Getting windows mousepointer icon = black square

I am going to ask there, wxWidgets has code to convert monochrome icons to a wxBitmap: https://github.com/wxWidgets/wxWidgets/blob/master/src/msw/bitmap.cpp#L486 Problem is that there's the right comments, but the code does nothing to handle the double-height. Seems something like "i forgot to...