SetOpacity documentation
Posted: 28 Nov 2018, 18:18
Hi!
I had quite a problem with this function: void Brush::SetOpacity(float opacity);
I think that the implementation of this is quite different form what average person would guess. At least I would guess that SetOpacity(0.5f) would set opacity to ~0x7F, SetOpacity(1.0f) would set it to ~0xFF etc... The actual behavior is SetOpacity(0.5f) sets opacity to "xaml defined opacity" * 0.5
I would say it deserves better documentation (the current description "Gets/Sets Opacity" leaves me quite confused).
cheers,
matejr5
I had quite a problem with this function: void Brush::SetOpacity(float opacity);
I think that the implementation of this is quite different form what average person would guess. At least I would guess that SetOpacity(0.5f) would set opacity to ~0x7F, SetOpacity(1.0f) would set it to ~0xFF etc... The actual behavior is SetOpacity(0.5f) sets opacity to "xaml defined opacity" * 0.5
I would say it deserves better documentation (the current description "Gets/Sets Opacity" leaves me quite confused).
cheers,
matejr5