Search found 126 matches

by kipade
Thu Feb 22, 2024 9:36 am
Forum: C++ Development
Topic: How to rotate a png image without fill the uncovered pixels black or other mask colour?
Replies: 14
Views: 1309

Re: How to rotate a png image without fill the uncovered pixels black or other mask colour?

I told and showed you that you must call wxDC::DrawBitmap() with useMask argument set to true. You still don't do it, using its default false value: dc.DrawBitmap(img, 0, 0); What do I miss here? Oh, sorry, I just though useMask automately because of SetMaskColour of wxImage. Yes, it works now. Tha...
by kipade
Thu Feb 22, 2024 8:58 am
Forum: C++ Development
Topic: How to rotate a png image without fill the uncovered pixels black or other mask colour?
Replies: 14
Views: 1309

Re: How to rotate a png image without fill the uncovered pixels black or other mask colour?

Yes, your application works fine. Might be there ware some other problem about my test. From your code, I replace MyCanvas::DrawCircles function in samples/drawing drawing.cpp with following: void MyCanvas::DrawCircles(wxDC& dc) { wxImage img("b.png"); wxCHECK_RET(img.IsOk(), "inv...
by kipade
Thu Feb 22, 2024 1:09 am
Forum: C++ Development
Topic: How to rotate a png image without fill the uncovered pixels black or other mask colour?
Replies: 14
Views: 1309

Re: How to rotate a png image without fill the uncovered pixels black or other mask colour?

Sorry, I still don't really understand what are you trying to say and what is the actual issue. Are you just asking why wxImage::HasAlpha() returns false before rotating the picture with mask and true after? If so, it is because the alpha channel for wxImage was not created when it was loaded: The ...
by kipade
Wed Feb 21, 2024 10:30 am
Forum: C++ Development
Topic: How to rotate a png image without fill the uncovered pixels black or other mask colour?
Replies: 14
Views: 1309

Re: How to rotate a png image without fill the uncovered pixels black or other mask colour?

The image seems to have an alpha channel but are any of its pixels actually translucent/transparent? I see the wide gap around the red rectangle as white, not transparent? Using the code from my previous post on it still leaves the new pixels in the rotated image transparent. b rotated.png What exa...
by kipade
Wed Feb 21, 2024 6:08 am
Forum: C++ Development
Topic: How to rotate a png image without fill the uncovered pixels black or other mask colour?
Replies: 14
Views: 1309

Re: How to rotate a png image without fill the uncovered pixels black or other mask colour?

If you're willing to modify the wxWidgets sources, the easiest way would be to add a parameter for the alpha value of uncovered pixels to the wxImage::Rotate() method: https://github.com/wxWidgets/wxWidgets/blob/f24b3d54833a1c15ae3bba87dead83bf9a90c41d/src/common/image.cpp#L3607 Alternatively you c...
by kipade
Wed Feb 21, 2024 2:23 am
Forum: C++ Development
Topic: How to rotate a png image without fill the uncovered pixels black or other mask colour?
Replies: 14
Views: 1309

Re: How to rotate a png image without fill the uncovered pixels black or other mask colour?

Thanks for your example, I found my drawing will be ok if I re-save a new png file use your method and the origin problem was due to the alpha processing of png file.
by kipade
Tue Feb 20, 2024 2:24 am
Forum: C++ Development
Topic: How to rotate a png image without fill the uncovered pixels black or other mask colour?
Replies: 14
Views: 1309

How to rotate a png image without fill the uncovered pixels black or other mask colour?

Here, I want to rotate a png image and leave the uncovered pixels transparent instead a opaque color? Thanks
by kipade
Tue Jun 19, 2018 8:13 am
Forum: Platform Related Issues
Topic: Is there a team working for wxDFB on arm linux?
Replies: 3
Views: 1273

Re: Is there a team working for wxDFB on arm linux?

Yes, I also want to see if somebody here working on it.
I just compiled it successfully today, wx version 3.0.4.
but there were some runtime dependency issue, libSM, libice...
so, I hope I can get some information about it while
im trying resolve it.

Thanks.
by kipade
Tue Jun 19, 2018 2:18 am
Forum: Platform Related Issues
Topic: Is there a team working for wxDFB on arm linux?
Replies: 3
Views: 1273

Is there a team working for wxDFB on arm linux?

I want to know if there was a team working for wxDFB on arm linux?
I encountered some compiling issues for wxDFB on current wxWidgets version,
arm linux platform.
by kipade
Thu Nov 30, 2017 3:36 am
Forum: wxWidgets Development (Chinese)
Topic: error [vector.h(404) assert "idx < m_size" failed in at().]
Replies: 1
Views: 11604

Re: error [vector.h(404) assert "idx < m_size" failed in at().]

不建议直接这么做
建议在线程里面通过event来让UI来追加
因为,在其它工作线程中调用UI操作是危险的,所以你那个问题没必要深究(即使它的确是个问题,也应该在处理好同步之后再说)
by kipade
Thu Nov 30, 2017 3:33 am
Forum: wxWidgets Development (Chinese)
Topic: wxSocket 如何使用ssl开发https服务程序
Replies: 1
Views: 11613

Re: wxSocket 如何使用ssl开发https服务程序

建议使用libcurl,这个库的强大不言而喻
wx的封装是wxCurl
by kipade
Tue Nov 28, 2017 12:53 pm
Forum: C++ Development
Topic: shift key was eaten by wxStyledTextCtrl
Replies: 0
Views: 6102

shift key was eaten by wxStyledTextCtrl

I using Chinese input method, via SCIM, which has a feature, switching input action between Chinese and English quickly if the shift key was pressed.
However, this feature is gone in wxStyledTextCtrl(like stc sample).
I want to know if some body know a way to get it back.
Thanks.
by kipade
Tue Nov 07, 2017 10:48 am
Forum: wxWidgets Development (Chinese)
Topic: 如何初始化wxchar[]和与wxString转化?
Replies: 1
Views: 11366

Re: 如何初始化wxchar[]和与wxString转化?

你可以使用
wxString str = wxT("00011111000000011");
你也可以:wxString str = _("00011111000000011");
你还可以: wxString str = "00011111000000011";
你仍然可以:wxString str = wxString::Format(wxT("00011111000000011"));
....
by kipade
Tue Nov 07, 2017 10:46 am
Forum: wxWidgets Development (Chinese)
Topic: wxsocket最大连接数
Replies: 1
Views: 11425

Re: wxsocket最大连接数

这个和wx没有关系,linux默认可打开文件数目是1024,而linux下socket也是文件,那么socket连接最大数目也是1024, 但是程序肯定还有别的文件被打开比如stdxx,也即实际最大数目也是少于1024的。