Windows 运行时相当于 WriteableBitmap 的 AddDirtyRect
Windows Runtime equivalent to WriteableBitmap's AddDirtyRect
我正在构建一个应用程序,我想在屏幕上围绕用户的手指触摸重新绘制图像。 System.Windows.Media.Imaging.WriteableBitmap has a method AddDirtyRect(Int32Rect dirtyRect) to indicate to indicate changes my code has made to the back buffer so that the whole image needn't be redrawn. Its Windows Runtime equivalent, the Windows.UI.Xaml.Media.Imaging.WriteableBitmap class, 没有。
我可以告诉系统重绘屏幕的哪一部分作为代码更改的结果 Windows.UI.Xaml.Media.Imaging.WriteableBitmap 吗?
不,这个 API 不存在。您可以使用辅助补丁位图来仅更新渲染输出的一部分。如果您需要更好地控制什么被推送到缓冲区,您需要使用 SwapChainPanel
和 DirectX。
我正在构建一个应用程序,我想在屏幕上围绕用户的手指触摸重新绘制图像。 System.Windows.Media.Imaging.WriteableBitmap has a method AddDirtyRect(Int32Rect dirtyRect) to indicate to indicate changes my code has made to the back buffer so that the whole image needn't be redrawn. Its Windows Runtime equivalent, the Windows.UI.Xaml.Media.Imaging.WriteableBitmap class, 没有。
我可以告诉系统重绘屏幕的哪一部分作为代码更改的结果 Windows.UI.Xaml.Media.Imaging.WriteableBitmap 吗?
不,这个 API 不存在。您可以使用辅助补丁位图来仅更新渲染输出的一部分。如果您需要更好地控制什么被推送到缓冲区,您需要使用 SwapChainPanel
和 DirectX。