Draw text on a .net Control with negative color of the background - blend

前端 未结 2 526
天涯浪人
天涯浪人 2021-01-19 01:53

I\'d like to draw a progress bar with percentage in its center, but I\'d like the text to have negative (contrasted) color of the

2条回答
  •  栀梦
    栀梦 (楼主)
    2021-01-19 02:39

    What you're doing is fine. Old tricks like SetROP2() don't work anymore with text getting anti-aliased, especially with ClearType rendering. Getting the aliasing pixels with the wrong color is very noticeable. Graphics.CompositingMode accordingly doesn't support the effects anymore.

提交回复
热议问题