Project

General

Profile

WRasterImage don't repaint.

Added by Marcel Tella about 14 years ago

Hi experts!

I've got into a trouble which is being very difficult to solve.

I've created a class called WebImage, this class recieves an image and shows it in the web.

My aim was, I wanted a WImage and a WRasterImage as members of this class. This way I could paint and repaint without having to use WRasterImage.

Just Using WebImage.

The thing is, it doesn't refresh the image, when I modify the WRasterImage, and then reset the WImage with the method .setResource(resource)

The only way it has worked has been just creating a new WRasterImage for each painting, which is a terrible lack of memory, because I'm just doing news, but I'm not doing any delete.

I'm going to attach you my class in a .zip.

How could I face this?

Thank you very much! I really appreciate your help


Replies (1)

RE: WRasterImage don't repaint. - Added by Pieter Libin about 14 years ago

Dear Marcel,

WImage::setResource(WResource* resource) only has effect if resource is a new pointer.

You can achieve what you intend, by calling WResource::setChanged() on your resource.

Kind regards,

Pieter

    (1-1/1)