【问题标题】:non standard shape antialiased WPF window非标准形状抗锯齿 WPF 窗口
【发布时间】:2009-03-31 12:37:33
【问题描述】:

我正在使用C#创建一个非标准形状的WPF窗口,由于“AllowTransparency=True”的一些问题,我使用了CreateRoundRectRgn CreateEllipticRgnSetWindowRgn win32 API Region functions,但有一个问题是边缘不平滑,如图所示http://img17.imageshack.us/img17/206/sampley.png

alt text http://img17.imageshack.us/img17/206/sampley.png

如何实现抗锯齿以使边缘看起来更平滑?

【问题讨论】:

    标签: c# .net wpf antialiasing region


    【解决方案1】:

    您不能,抗锯齿边缘需要每个像素的 Alpha 通道(AllowTransparency=true 所做的) - 但是当您打开该选项时(使用 AllowTransparency 或通过调用 Win32 API,结果是相同的)你会遇到很多麻烦——就像你已经发现的那样。

    【讨论】:

      猜你喜欢
      • 2012-12-23
      • 1970-01-01
      • 2014-07-14
      • 1970-01-01
      • 2014-12-04
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2011-05-16
      相关资源
      最近更新 更多