GDI+ 抖动问题
我有一个使用适用于 Windows 的 Win32 API 的 C++ 应用程序,并且我遇到了 GDI+ 抖动问题,但我不知道为什么会出现这种情况。
我有一个自定义控件(自定义窗口)。 当我收到 WM_PAINT 消息时,我在图形设备上使用 FillPolygon 绘制一些多边形。 该图形设备是使用 BeginPaint 中的 HDC 创建的。
但是,当多边形出现在屏幕上时,它们会抖动而不是透明,并且似乎只显示很少的颜色(可能是 256?)当我使用 .NET 接口进入 GDI+ 在 C# 中执行相同的操作时,它工作正常,这让我想知道发生了什么事。
我没有做任何特别的事情,据我所知,这是一个简单的例子,应该可以正常工作。 难道我做错了什么?
编辑:没关系。 它仅发生在远程桌面上,即使 C# 示例不会在远程桌面上抖动。 远程桌面设置为 32 位颜色,所以我不知道这是怎么回事。
I have a C++ application that uses the Win32 API for Windows, and I'm having a problem with GDI+ dithering, when I don't know why it should be.
I have a custom control (custom window). When I receive the WM_PAINT message, I draw some Polygons using FillPolygon on a Graphics device. This Graphics device was created using the HDC from BeginPaint.
When the polygons appear on the screen, though, they are dithered instead of transparent, and only seem to show few colors (maybe 256?) When I do the same thing in C# using the .NET interface into GDI+, it works fine, which is leaving me wondering what's going on.
I'm not doing anything special, this is a simple example that should work fine, as far as I know. Am I doing something wrong?
Edit: Nevermind. It only happens over Remote Desktop, even though the C# example doesnt Dither over remote desktop. Remote Desktop is set at 32-bit color, so I don't know what's up with that.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
嗯...填充能力由目标设备决定。 通过远程桌面工作时,据我所知 Windows 会替换显示驱动程序,以便可以更改显示支持的功能。
Hmm... The filling capabilities are determined by the target device. When working over remote desktop, AFAIK Windows substitutes the display driver, so that can change the supported features of the display.
许多远程应用程序将减少颜色深度以减少带宽要求。 虽然我没有使用过远程桌面,但在某些 VNC 连接上也会发生同样的情况。 我会检查您的 RD 服务器和客户端设置。
Many remoting applications will reduce colour depth in order to reduce bandwidth requirements. While I haven't used Remote Desktop, the same happens on certain VNC connections. I'd check your RD server and client settings.