为 wpf WriteableBitmap 获取 DrawingContext [英] Getting a DrawingContext for a wpf WriteableBitmap

查看:24
本文介绍了为 wpf WriteableBitmap 获取 DrawingContext的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

有没有办法为 WriteableBitmap 获取 DrawingContext(或类似的东西)?IE.允许你调用简单的DrawLine/DrawRectangle/etc 类型的方法,而不是直接操作原始像素.

解决方案

出现这个词不是.

<小时>

为了将来参考,我们计划为 WPF 使用可写位图扩展的端口.>

对于使用纯粹现有代码的解决方案,下面提到的任何其他建议都适用.

Is there a way to get a DrawingContext (or something similar) for a WriteableBitmap? I.e. something to allow you to call simple DrawLine/DrawRectangle/etc kinds of methods, rather than manipulate the raw pixels directly.

解决方案

It appears the word is no.


For future reference, we plan to use a port of the Writeable Bitmap Extensions for WPF.

For a solution using purely existing code, any of the other suggestions mentioned below will work.

这篇关于为 wpf WriteableBitmap 获取 DrawingContext的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆