I am author of http://code.google.com/p/delaboratory/, I use wxWidgets for my project.
In my application I have image which is modified by user.
I store this image in my own code, then I need to render it on screen.
I use wxBufferedPaintDC in paintEvent and wxClientDC/wxBufferedDC in my 'repaint" method, that's OK.
However, the problem is how to actualy render pixels.
I use wxImage, and I operate on raw data with the help of image->GetData().
I don't need to recreate wxImage each time, I can create it once and recreate it only when size of the image changes.
But then I need to render image on DC. And for that I need wxBitmap.
and the code is:
Code: Select all
wxBitmap bitmap(*image); dc.DrawBitmap(bitmap, 0, 0, false);
is there any better solution to operate on pixels with wxWidgets in 2012?
(I don't ask about future solutions, it must work with 2.8 )