Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Refresh wxImage in wxPanel

65 views
Skip to first unread message

Gianluca

unread,
Sep 7, 2009, 2:24:03 AM9/7/09
to
Hi all,

I'm using the simple class at http://wiki.wxwidgets.org/An_image_panel
(the class with resize fuction) in my software, to add some image
through wxPanel.
Now, I'd like to add some method to manage and edit the loaded image;
for example I want to rotate the loaded image.
How I can refresh/reload the the image loaded in object construction?
I've to trigger the wxPaintEvent? And if yes, how to trigger it?

Thanks in advance

Vadim Zeitlin

unread,
Sep 10, 2009, 11:09:58 AM9/10/09
to
On 2009-09-07, Gianluca <gger...@gmail.com> wrote:
> How I can refresh/reload the the image loaded in object construction?
> I've to trigger the wxPaintEvent?

Yes.

> And if yes, how to trigger it?

By calling wxWindow::Refresh(). By default it will redraw the entire
window which is inefficient so you should find out the rectangle occupied
just by the image you ant to refresh and pass it to this function.

Regards,
VZ

--
TT-Solutions: wxWidgets consultancy and technical support
http://www.tt-solutions.com/

0 new messages