开发者

Capture image of window or widget in Mono

I'm trying to capture an image of either the current window or a widget and save it to an image file. T开发者_运维技巧he problem is that I'm using Gtk# on Mono, so it needs to be a solution that'll work with that.

Essentially, something like this:

myWidget.SaveImage("imageFile.png");

I'd prefer a PNG or JPEG, but a raw bitmap will do.


You should be able to do this using Gdk.

This is very similar to this question: How to take a screenshot with Mono C#?

I've also found a php-gtk example here: http://php-gtk.eu/code-hints/grabbing-a-screenshot-with-gdk

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜