demos/composition.Originally Posted by SkripT
demos/composition.Originally Posted by SkripT
wysota I've been looking the demo and I've noticed two main differences: they dont' use begin and end and they don't' paint in the paintEvent method (I think). I dont' know if these are the causes for my code not to work. But anyway I've seen that they repaint all the image everytime to delete the "old circle". And here's my question: do you think that painting all in a buffer(they use a qImage) and later paint this buffer on the destination widget (like a double buffering) is faster that paint every object to be drawn directly on the destination widget?? Thanks
Last edited by SkripT; 22nd February 2006 at 09:36.
I think the reason may be that different platforms use different paint enigines and probably not all of them support composing. Probably that's why they used qImage, as it uses the raster engine which probably has composing capabilities built in. Otherwise the demo might not work on all systems. For example Windows uses the rastering engine by default too, while X11 uses PostScript and Mac uses QuickDraw. Additionaly some platform support may be needed for composite to work on different renderers (like the COMPOSITE extension to X11).
Ok thanks a lot
Hi again, relating with my first question, I think that's impossible to paint under a widget without clearing the background in the way that I want. I've tried different ways: setting transparent background, different composition modes, etc. but no success: everytime clears the background. The only solution is to paint again all the image everytime that the rubberband changes its position or size. But as you can see, this is very inefficient specially if the image has a big size. The problem is that the rubberband is painted with some delay since the mouse cursor and it's a bit annoying. I'm thinking in other solutions: does anybody knows a way to paint the image in background mode and in a specified fixed position and size like if it was permanently "painted" on the widget? So it releases of painting everytime the image. I think that a QLabel wouldn't be useful because it wouldn't be able to paint the rubberband under the label...
Last edited by SkripT; 22nd February 2006 at 15:14.
Bookmarks