Discussion of article "Studying the CCanvas Class. How to Draw Transparent Objects" - page 7
You are missing trading opportunities:
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
Registration
Log in
You agree to website policy and terms of use
If you do not have an account, please register
this is where the algorithm of mixing other transparent colours is applied:
Where is the transparency? The shadows?
And where is the transparency? Shadows?
Nicholas, I'm not in the mood for flowers right now. If there is an error in the formula, thank you for pointing it out. I didn't check it much - I implemented it and forgot about it.
It would be good to apply your knowledge and achievements in the field of kanvas in something useful. Think about it.
Nicholas, I'm not in the mood for flowers right now. If there is an error in the formula, thank you for pointing it out. I didn't check it much - I implemented it and forgot about it.
It would be good to apply your knowledge and achievements in the field of kanvas in something useful. Think about it.
Thank you for prompting me, because this thought did not even cross my mind :)))
Well, seriously, I am very surprised by your words. Useless examples are just a demonstration of possibilities. An experienced eye will always see a lot of usefulness in seemingly useless things. And don't you know that what I am always talking about is very applicable in very useful things. And all this I do exclusively for the realisation of useful things. I just don't talk about it until I'm done.
Thanks for the tip, because this thought never even occurred to me :)))
Well, seriously, I am very surprised by what you say. Useless examples are just a demonstration of possibilities. An experienced eye will always see a lot of usefulness in seemingly useless things. And you should know that what I am always talking about is very applicable in very useful things. And all this I do exclusively for the realisation of useful things. I just don't talk about it until after I'm done.
I didn't say your examples were useless. On the contrary. The question is, when are you going to apply them to the useful thing? That is, you're creating a wrapper of that usefulness that you haven't shown anywhere else. And what it is and for what purpose - nobody knows. :))
I didn't say your examples were useless. On the contrary. The question is, when will you apply them to the useful thing? That is, you are creating a wrapper of something useful that has not been shown anywhere yet. And what it is and for what purpose - nobody knows. :))
not that ...
it's about Alpha1 and Alpha2.
It is also necessary to calculate not only the new-forming mixing colours but also the new-forming transparency.
...
It's just a bit of maths on the level of the 7th grade of secondary school. You get a long polynomial, you have to reduce it. The result should be a trinomial.
Better surprises than running ahead of the train.
Nikolai, everyone already knows you're number one on Canvas. I'm not arguing. Can you tell me, if you know, how to get back the colour and alpha from the final colour received from ColorToARGB()? Sent the colour and alpha, got the result, and then need to get the original colour and alpha from the result.
How to do it?
Nikolai, everyone already knows you're the first on Canvas. I'm not arguing. Can you tell me, if you know, how to get back the colour and alpha from the final colour received from ColorToARGB()? Sent the colour and alpha, got the result, and then you need to get the original colour and alpha from the result.
How to do it?
It's a mystery to me why R and B are swapped in ARGB from RGB. But it is a fact.
Very simple:
when debugging, we have:
z is the original RGB
a- the original alpha.
You can also do it via union or byte shifts, but the record will be longer.
When the colour components are known, I don't use ColorToARGB(clrRed,48) type record at all, but use hexadecimal form of record 0x30FF0000 (the same as ColorToARGB(clrRed,48)). Very convenient, clear and faster.
It's just a little bit of 7th grade maths. You get a long polynomial, you have to reduce it. The result should be a trinomial.
If you google "polynomial" or "trinomial" in Images, you'll get a lot of funny pictures :)))