tommy
26th March 2008, 21:52
Hello,
I have 3 QPixmaps and I'd like to merge them (put them on top of each other). What's the best way to do that?
So, I have 3 images (A,B,C) and I want to make 1 composite image (D) out of the three.
I want to define that A is the bottom image, B is the middle image and C is the top image.
So, C should get the highest priority. If parts of C are transparent, only then should the corresponding part of B show. And if C and B are both transparent, only then should the corresponding parts of A show. Just like in real life when you stack images that have transparent regions.
I'm pretty sure that I have seen a sample code here in this site (and the code was elegantly simple) but I just can't find it again.
I'm thankful for any ideas.
I have 3 QPixmaps and I'd like to merge them (put them on top of each other). What's the best way to do that?
So, I have 3 images (A,B,C) and I want to make 1 composite image (D) out of the three.
I want to define that A is the bottom image, B is the middle image and C is the top image.
So, C should get the highest priority. If parts of C are transparent, only then should the corresponding part of B show. And if C and B are both transparent, only then should the corresponding parts of A show. Just like in real life when you stack images that have transparent regions.
I'm pretty sure that I have seen a sample code here in this site (and the code was elegantly simple) but I just can't find it again.
I'm thankful for any ideas.