替换 UIElements 动画时如何提高 Silverlight WritableBitmap 质量

发布于 2024-09-04 15:22:57 字数 246 浏览 3 评论 0原文

我正在制作一个动画,暂时降低 UIElement 的可见性并覆盖原始 ImageWritableBitmap 版本。

我遇到的问题是,当我在带有文本的元素上执行此操作时,会产生明显模糊且较暗的图像,这意味着从 UIElementImage 的切换非常明显。

有没有人经历过这个和/或知道如何处理这个问题?

I'm doing an animation where I temporarily drop down the visibility of UIElements and overlay WritableBitmap versions of the original Image.

The problem I have is that when I do this on element with text, it results in a noticeably blurry and darker image meaning the switch from UIElement to Image is noticeable.

Has anyone experienced this and/or know how to deal with this issue?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

夜吻♂芭芘 2024-09-11 15:22:57

对于标准文本呈现,Silverlight 使用 ClearType。不幸的是,不能使用 ClearType 将文本渲染为 WritableBitmap。这就是您在场景中看到文本质量差异的原因。顺便说一句,将 CacheMode 设置为 BitmapCache 或使用像素着色器也会禁用 ClearType(请参阅 http: //forums.silverlight.net/forums/p/109627/247959.aspx

由于渲染到 WritableBitmap 中的文本质量无法提高,我能想到的唯一解决方案是降低 UI 的文本渲染质量使用我上面提到的方法之一。

For standard text rendering Silverlight uses ClearType. Unfortunatly, ClearType can not be used then rendering text into WritableBitmap. That is why you see the difference in text quality in your scenario. Btw setting CacheMode to BitmapCache or using pixel shaders will disable ClearType as well (see http://forums.silverlight.net/forums/p/109627/247959.aspx)

Since quality of the text rendered into WritableBitmap can not be improved the only solution I can think of is to reduce text rendering quality of your UI using one of the methods I mentioned above.

許願樹丅啲祈禱 2024-09-11 15:22:57

您是否考虑过添加

<param name="EnableGPUAcceleration" value="true" />

到插件对象标记中,

<xxxxx CacheMode="BitmapCache">

....

</xxxxx>

其中 xxxxx 是您将用 WritableBitmap 覆盖的元素。使用这种方法也许一开始就不需要WritableBitmap

Have you considered adding

<param name="EnableGPUAcceleration" value="true" />

to the plug in object tag and

<xxxxx CacheMode="BitmapCache">

....

</xxxxx>

Where xxxxx is the element which you would otherwise cover with a WritableBitmap. Using this approach perhaps the WritableBitmap would not be needed in the first place.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文