Discussion of article "Studying the CCanvas Class. How to Draw Transparent Objects" - page 5

 
Konstantin Seredkin:

Greetings, guys, can you tell me how to make the information panel so that the icons of deals are not superimposed on top.

It seems to be in the foreground, everything is drawn behind it, but the deals are overlaid on top.


I won't check it now, but it is possible that the panel - a real panel - is built on the basis of CDialog. I will check it later (in a day or two) ...

 
Konstantin Seredkin:

Greetings, guys, can you tell me how to make the information panel so that the icons of deals are not superimposed on top.

It seems to be in the foreground, everything is drawn behind it, but the deals are overlaid on top.


So I checked: definitely, it is necessary to make a real panel on the basis of CDialog class.

And now how to put a panel on top of "Buy" and "Sell" icons: each panel has a "Collapse panel" icon:

Collapse panel

after you collapse the panel and then expand it again - all objects in your panel will become on top of all previous icons. That is, after you unfold it, the panel redraws its objects and they will be the last created ones.

 
Vladimir Karputov:

So I checked: it is definitely necessary to make a real panel based on CDialog class.

And now how to put a panel on top of "Buy" and "Sell" icons: each panel has a "Collapse panel" icon:


after you collapse the panel and then expand it again - all objects in your panel will become on top of all previous icons. That is the panel after you unfold it redraws its objects and they will be the last created ones.


So the object OBJ_RECTANGLE_LABEL cannot be in full priority 100% before all objects ?

It turns out that all other objects can be in the background, but icons and transaction bars are still in priority over everything. - out of order

 
Konstantin Seredkin:

So the object OBJ_RECTANGLE_LABEL cannot be in full priority 100% before all objects ?

It turns out that all other objects can be in the background, but icons and transaction bars are still in priority over everything else. - no order


It is more like unwillingness of the programmer to make his programme correctly, taking into account the specifics of rendering volumes. The terminal has nothing to do with it.

 
Konstantin Seredkin:

So the object OBJ_RECTANGLE_LABEL cannot be in full priority 100% before all objects ?

It turns out that all other objects can be in the background, but icons and transaction bars are still in priority over everything else. - out of order

Take into account the time of creation of objects, it is the priorities, who is the last, the one on top.

 
Konstantin Seredkin:

So the object OBJ_RECTANGLE_LABEL cannot be in full priority 100% before all objects ?

It turns out that all other objects can be in the background, but icons and transaction bars are still in priority over everything else. - out of order

Yes, setting the display order is not implemented normally. It is necessary to create complicated gardens with recreating.

 
Andrey Khatimlianskii:

Yes, setting the display order is not implemented properly. It is necessary to make complicated garden with recreating.

Therefore, it is time for developers to think about an additional parameter when creating objects.

 
hello friend, very good your article  has a very interesting content.
 
Finally found an article where I could use at least something.))) I used the method described in the article of mixing two colours (top and bottom) and got the effect of transparency inside one canvass. Thank you.
 
Реter Konow:
Finally found an article where I could use at least something.))) I used the method described in the article of mixing two colours (top and bottom) and got the effect of transparency inside one canvass. Thank you.

That, Peter, is too simple.

Here is a task for you to master and fix the essence of the question:

- how to mix two colours ARGB(a1,r1,g1,b1) and ARGB(a2,r2,g2,b2) within one layer, each of which has its own transparency a1 and a2?

Without this blending, it is impossible to properly overlay anti-aliased objects on top of each other.