Updownquark / Quick

Quark's User Interface Creation Kit
0 stars 0 forks source link

Fix transparent rendering #45

Open Updownquark opened 10 years ago

Updownquark commented 10 years ago

I realized yesterday that my scheme for rendering partially transparent widgets is both flawed and inefficient. I recently introduced a change so that when a transparent widget is repainted, the paint command is re-issued to the body element for the rectangle that the target widget occupies.

This is inefficient since rendering only needs to be done from the shallowest non-transparent widget up to the target.

The flaw is that if there is a sibling rendered at the same location as the target or one of its parents with a higher z value then its siblings, the rendering will go on top of the higher z-valued siblings.

The rendering system needs to be fixed to be as efficient as possible but always correct, even for overlapping siblings. A test should be written to verify that rendering works in these edge cases.