Search found 90 matches

by Parduz
Thu Jan 28, 2021 3:31 pm
Forum: C++ Development
Topic: How "wxDc.GetAsBitmap()" is suppose to work?
Replies: 2
Views: 5

Re: How "wxDc.GetAsBitmap()" is suppose to work?

'cause it could have been a nice "one-liner" to have a screenshot in a wxImage (this is important 'cause access to the wxImages pixels using a pointer to GetData() is so much faster than accessing the wxBitmap pixels using wxNativePixelData).
by Parduz
Thu Jan 28, 2021 2:31 pm
Forum: C++ Development
Topic: How "wxDc.GetAsBitmap()" is suppose to work?
Replies: 2
Views: 5

How "wxDc.GetAsBitmap()" is suppose to work?

This is an excerpt of code: the idea is to capture a portion of the screen. const wxPoint wxpZero(0,0); // handy 0,0 point wxScreenDC dcScreen; // Screen DC wxRect rCapture(0,0,200,200); // Area i want to capture // Working "canon" screencapture method wxBitmap bCapture(rCapture.GetSize(),24); wxMem...
by Parduz
Fri Jan 15, 2021 11:11 am
Forum: C++ Development
Topic: wxFilePickerCtrl really slow
Replies: 3
Views: 116

wxFilePickerCtrl really slow

wxWidgets 3.1.3, Windows 7 64. I'm rewriting an old, little C++Builder2006 program with wxWidgets and gcc. It requires a FileOpen dialog, and i've choose to use a wxFilePickerCtrl. My problem is that it is really slow: it tooks almost 2s to open the dialog window, 1s to "fill it up" (it is just whit...
by Parduz
Fri Jan 08, 2021 1:42 pm
Forum: Compiler / Linking / IDE Related
Topic: CodeBlock vs Codelite: undefined references
Replies: 1
Views: 121

CodeBlock vs Codelite: undefined references

I need to migrate a project from CodeBlocks to Codelite. In C:B it compiles (almost * ) flawlessy, while in CL it generates a lot of undefined references. I see how the problem arises here a lot, and i'm so sorry to ask about them again, but i really tried to get what's the difference between the tw...
by Parduz
Fri Dec 11, 2020 10:38 am
Forum: C++ Development
Topic: There's a way to cast Windows RECT (tagRECT) to wxRect and back?
Replies: 2
Views: 102

Re: There's a way to cast Window RECT (tagRECT) to wxRect and back?

Wonderful.
I'm amazed about how much my searching skills are low! :)

Thanks a lot.
by Parduz
Fri Dec 11, 2020 10:17 am
Forum: C++ Development
Topic: There's a way to cast Windows RECT (tagRECT) to wxRect and back?
Replies: 2
Views: 102

There's a way to cast Windows RECT (tagRECT) to wxRect and back?

As per title: there's a (fast) way to cast or copy between RECT and wxRect, or do i need to set each vertex by hand?
by Parduz
Thu Dec 03, 2020 12:58 pm
Forum: C++ Development
Topic: what is the fastest way to loop thru all the pixels of a wxBitmap?
Replies: 18
Views: 535

Re: what is the fastest way to loop thru all the pixels of a wxBitmap?

The bottleneck was storing all the pixel coordinates but you do not even have to do that, you only need to track their minimal and maximal coordinates, right? More or less. I may want to try to "recon" the caret shape and color to "filter out" other changes. The whole project is still to be defined...
by Parduz
Thu Dec 03, 2020 9:12 am
Forum: C++ Development
Topic: what is the fastest way to loop thru all the pixels of a wxBitmap?
Replies: 18
Views: 535

Re: what is the fastest way to loop thru all the pixels of a wxBitmap?

Guys, i'm learning so much from this, thanks. About saving the coords: My experiment is to try to catch (by just using screeshots) where the caret is or where the user is typing: so right now the storing is abandoned when the Xs or the Ys "distance" exceed a limit, as it means that the screen is "ch...
by Parduz
Wed Dec 02, 2020 2:00 pm
Forum: C++ Development
Topic: what is the fastest way to loop thru all the pixels of a wxBitmap?
Replies: 18
Views: 535

Re: what is the fastest way to loop thru all the pixels of a wxBitmap?

which are more or less consistent with yours. Not really ;) PB's slowest version is the fastest on your system. Quite interesting actually. yeah. What i mean was that, being the blitting not an option (as i don't know which pixels are not black), the pixeldata iterator was the slow one, compared to...
by Parduz
Wed Dec 02, 2020 10:50 am
Forum: C++ Development
Topic: what is the fastest way to loop thru all the pixels of a wxBitmap?
Replies: 18
Views: 535

Re: what is the fastest way to loop thru all the pixels of a wxBitmap?

Many thanks for your test program. I have lots to learn from it :) My results on my (pretty old) developing machine are these: testspeed.png which are more or less consistent with yours. (this is a wxWidgets 3.1.3 debug build) Now, i can't use the BitBlt function (as i need to check the result of ea...
by Parduz
Tue Dec 01, 2020 3:33 pm
Forum: C++ Development
Topic: what is the fastest way to loop thru all the pixels of a wxBitmap?
Replies: 18
Views: 535

what is the fastest way to loop thru all the pixels of a wxBitmap?

MS Windows: I need to XOR the pixels of two images, writing (drawing) the result on a third one (but here i could add more pixel manipulation in the future), and save the x,y coords of the pixels which are != 0 (0,0,0). What's the fastest way to access the wxBitmap pixels? Is the sample code in the ...
by Parduz
Tue Mar 10, 2020 10:47 am
Forum: Component Writing
Topic: Making a PNG animation control: what's the best approach?
Replies: 1
Views: 830

Making a PNG animation control: what's the best approach?

I want to make a control that works with PNGs but looks like the wxAnimation (same exposed functions, so i can replace it with mine); so basically the animation is a single long PNG "strip" of frames, and the control show a portion of it as a "frame". What should be the best approach? Should i start...
by Parduz
Wed Feb 26, 2020 10:11 am
Forum: Compiler / Linking / IDE Related
Topic: wxCrafter and GIF files for wxAnimation
Replies: 1
Views: 301

wxCrafter and GIF files for wxAnimation

My app UI is "assembled" using wxCrafter, either as a standalone program on Windows or as plugin in Debian, then i develop and compile using Code::Blocks and g++. wxCrafter creates a cpp files containing all the bitmaps (icons and images) i put in the controls with it, but does'nt do that with the G...
by Parduz
Mon Feb 24, 2020 10:26 am
Forum: C++ Development
Topic: EVT_NOTEBOOK_PAGE_CHANGING: can i change the new page?
Replies: 3
Views: 406

Re: EVT_NOTEBOOK_PAGE_CHANGING: can i change the new page?

Mhm, this looks quite odd to me from the user view point. Anyway, did you try in the page changing event handler just vetoing the change and then calling wxNotebook::ChangeSelection() with CallAfter()? I'm a bit lost, as it seems i'm not able to write a CallAfter() call which compiles. CallAfter( [...
by Parduz
Fri Feb 21, 2020 4:04 pm
Forum: C++ Development
Topic: EVT_NOTEBOOK_PAGE_CHANGING: can i change the new page?
Replies: 3
Views: 406

EVT_NOTEBOOK_PAGE_CHANGING: can i change the new page?

I need to "intercept" a page change and "redirect" it to another page (as example, it is changing to page 1 and i want it to land on page 9). The Page Changing event seemed the right place to do it by using the event->SetSelection, but the wxBookCtrlBase::DoSetSelection ignores the values of the eve...