[Qt-interest] paint one image over other continously
Andre Somers
andre at familiesomers.nl
Fri Sep 25 12:38:50 CEST 2009
Rahulkumar Tibdewal wrote:
> Thanks Ulf,
>
> I think I don't have Original coordinates. I have only the images as attached from client. And only part of it is actually useful enough.
> I guess we need those useful part coordinates. Can you have a look at mages and help me get those coordinates so that exactly pasting is possible.
>
>
>
I had a "so you want to guess where the pieces should end up" kind of
reply in mind, but then I started to select the rest of your message...
Those images look as if they are all of the same size, but are
transparent in the area's where they did not change. Is that correct?
If that is the case, you can simply use the already mentioned
QPainter::drawImage on an already mentioned internal QImage or QPixmap
buffer, and simply draw that buffer after an update. With a bit of
trickery, you may even be able to extract the rects that are updated in
a frame, so you can give your update() call information on what changed.
But I guess it depends on the way your images are encoded how
efficiently you can find out such rects.
André
More information about the Qt-interest-old
mailing list